将博客转移到github
使用了基于jekyll的hexo.在默认主题light上添加了duoshuo评论以及jiathis分享
1.duoshuo评论
在themes/light/layout/_partial/post/comment.ejs中
<% if (theme.duoshuo_shortname && page.comments){ %>
<section id="comment">
<h1 class="title"><%= __('comment') %></h1>
<div class="ds-thread" data-title="<%= item.title %>">
</div>
</section>
<% } %>
在after_footer.ejs中相应段改为
<% if (theme.duoshuo_shortname && page.comments){ %>
<section id="comment">
<h1 class="title"><%= __('comment') %></h1>
<div class="ds-thread" data-title="<%= item.title %>">
</div>
</section>
<% } %>
然后在_config.yml中加入
duoshuo_shortname:
2.jiathis
在share.ejs中修改为
<% if (theme.jiathis.enable){ %>
<div class="jiathis_style"><span class="jiathis_txt">分享到:</span>
<a class="jiathis_button_qzone"></a>
<a class="jiathis_button_tsina"></a>
<a class="jiathis_button_weixin"></a>
<a class="jiathis_button_cqq"></a>
<a class="jiathis_button_fb"></a>
<a class="jiathis_button_pocket"></a>
<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jiathis_separator jtico jtico_jiathis" target="_blank"></a>
<a class="jiathis_counter_style"></a>
</div>
<script type="text/javascript" >
var jiathis_config={
summary:"",
shortUrl:true,
hideMore:false
}
</script>
<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
<% } %>
然后在_config.yml中删除addthis部分
加入
jiathis:
enable: true