[toc]
必备插件
git方式部署 hexo-deployer-git
生成feed hexo-generator-feed
时尚的pandoc渲染器 hexo-renderer-pandoc(其实还得在本机装pandoc)
改主题
挑啊挑。
主题"coney",修改自pacman。
回归Disqus
pacman为国人编写,采用“多说”作为评论系统。然而,反感于“多说”必须用国内账号绑定,不能用邮箱等方式注册;更为了衬托个人高冷的气质,决心把评论系统改回Hexo默认的Disqus。
走了一些弯路,不表。
搜了一下,果然有人也这么干过,另外再参考这篇教程,把disqus搞回来了。
怎么改:
主题装好,先删掉.git文件夹,以免更新后,自己辛勤劳动毁于一旦。
site.config
disqus_shortname: ooxx
themes/xxxx/layout/_partial/post/comment.ejs
<% if (page.comments){ %>
<section calss="comment">
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'ooxx';
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
</section>
<% } %>
themes/xxxx/layout/_partial/after_footer.ejs
<% if (page.comments){ %>
<script type="text/javascript">
var disqus_shortname = 'ooxx';
(function () {
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
</script>
<% } %>
新建 themes/xxxx/source/css/_partial/comment.styl
#comment padding 20px background #272822 box-shadow 1px 2px 3px #ddd margin-bottom 50px .title font-weight normal margin-bottom 15px
theme/xxxx/source/_partial/css/style.styl
@import '_partial/comment'
顶栏
还是觉得header太高了
在header>body>padding的第三个,我是改成了0.8em
图标缩小后看不清啊,变大
去掉侧栏显示按钮的白框(未能解决按钮乱飘的问题)
本作品采用知识共享署名-非商业性使用-相同方式共享 3.0 中国大陆许可协议进行许可。