pan's record

利用Hexo搭建个人博客

在利用Hexo搭建个人博客过程中遇到的问题和解决方法。
主要是参考别人的经验,按照需要引入新功能。

关键步骤

修改URL形式

在博客中点开渲染后的html文档,可以看到,网站格式为root/yera/month/day/file,由于年月日信息对于读者
来说重要程度不高,想替换成root/category/file
打开整个网站(非主题)中的 _config.yml文件,

修改

尾部余量

起因:段结尾一般有个图,图本身上下就有余量,俩余量加一起很宽
找到 themes\next_2\source\css_common\scaffolding\base.styl
p { margin: 0 0 0 0; }分别为顺时针余量,改第三个为0,则删除余量间隔。

增加评论

原先准备用gitment,后来这个作者跑路了,转用gitalk。
得用github账号评论,以后有需要了再加吧。

https://blog.csdn.net/yanzi1225627/article/details/77890414
https://zonghongyan.github.io/2017/06/29/201706292034/
https://imsun.net/posts/gitment-introduction/
https://github.com/settings/applications/766829
https://www.cnblogs.com/pangguoming/p/8094815.html

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Client ID
151d92bb28cc8d3f739e
Client Secret
eed46e19142bd6899045444f2220696680df0f0a



gitment:
enable: true
githubID: panxiang315
repo: panxiang315.github.io
ClientID: 151d92bb28cc8d3f739e
ClientSecret: eed46e19142bd6899045444f2220696680df0f0a
lazy: true

{% elseif theme.gitment.enable %}
{% if theme.gitment.lazy %}
<div onclick="ShowGitment()" id="gitment-display-
button">{{ __('gitmentbutton') }}</div>
<div id="gitment-container"
style="display:none"></div>
{% else %}
<div id="gitment-container"></div>
{% endif %}

{% include 'gitment.swig' %}

@import "gitment";

贴图

https://jverson.com/2017/05/28/qiniu-image-v2/
http://www.cnblogs.com/fanzhidongyzby/p/6637084.html

参考轮子

建议直接先看这个博客
也可以看看这个博客

插入动态图表很酷,可惜会报不安全,不人性化

置顶

图标库

🐶 您的支持将鼓励我继续创作 🐶