GiseR13

hexo进阶

多说评论系统

若要给文章添加评论系统,可通过注册多说,自定义一个用户名,然后在主题配置文件中找到duoshuo_shortname,把用户名天上。
再找到D:\Hexo\themes\next\layout\_partial\_post\comments.swig中找到一下代码,把你刚在多说中获得的通用代码贴上。

1
2
3
4
5
<div class="comments" id="comments">
{% if (theme.duoshuo and theme.duoshuo.shortname) or theme.duoshuo_shortname %}
#此处粘贴你的通用代码
{% elseif theme.facebook_sdk.enable and theme.facebook_comments_plugin.enable %}
</div>

友情链接

想在博客首页中插入一些牛人的链接或者友情链接可以通过在主题config文件中配置,在文件中找到Links字段然后根据下面的方式配置即可。

1
2
3
4
links:
Title: url
考据癖: http://localhost-8080.com/
matrix67: http://matrix67.com/

社交链接

同样在主题配置文件中找到social字段,然后把自己想要挂上的社交媒体链接挂上。

1
2
3
4
social:
#LinkLabel: Link
Weibo: http://weibo.com/innerpeace1119/
GitHub: https://github.com/Feichaisong

插入音乐

想要在文章中插入音乐可以通过插入html标签的方式。

1
<iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=330 height=86 src="//music.163.com/outchain/player?type=2&id=25721157&auto=1&height=66"></iframe>