Skip to content

Commit

Permalink
Add navigators for previous post and next post in every post
Browse files Browse the repository at this point in the history
  • Loading branch information
sadwxqezc committed Mar 6, 2016
1 parent 23646f0 commit d909f09
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion _layouts/post.html
Expand Up @@ -13,6 +13,13 @@ <h1>{{ page.title }}</h1>
{{content}}
</article>
<hr>
{% if page.previous %}
<a href="{{page.previous.url | prepend:site.baseurl | replace:'//','/'}}">上一篇博客:{{page.previous.title}}</a><br>
{% endif %}
{% if page.next %}
<a href="{{page.next.url | prepend:site.baseurl | replace:'//','/'}}">下一篇博客:{{page.next.title}}</a>
{% endif %}
<hr>
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_douban" data-cmd="douban" title="分享到豆瓣网"></a><a href="#" class="bds_fbook" data-cmd="fbook" title="分享到Facebook"></a><a href="#" class="bds_copy" data-cmd="copy" title="分享到复制网址"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
</div>
Expand All @@ -34,4 +41,4 @@ <h1>{{ page.title }}</h1>
<div class="content-text"></div>
</div>
</div>
</div>
</div>

0 comments on commit d909f09

Please sign in to comment.