Hexo-theme-next: 请问怎么在每篇文章末尾统一添加“本文结束”标记?

Created on 11 Aug 2016  ·  2Comments  ·  Source: iissnan/hexo-theme-next

Expected behavior (预期行为)

为每篇文章末尾统一添加如下样式:

--------- 本文结束 ---------

Actual behavior (实际行为)

没有“本文结束”标记

Steps to reproduce the behavior (重现步骤)

NexT Informations

Add the ✔ sign before an item which is affected by this behavior.

NexT Version:

  • Master
  • Latest Release ✔
  • Old version -

NexT Scheme:

  • All schemes ✔
  • Muse
  • Mist
  • Pisces

Other Informations (Like Browser, System, Screenshots)

效果如下图所示:
passageend

Most helpful comment

建议直接修改home/scaffolds/post.md模板文件

All 2 comments

自己摸索出来了解决办法,遂自问自答了。
找到themes/next/layout/_macro/post.swig,添加如下代码:

<div>
  {% if not is_index %}
    <div style="text-align:center;color: #ccc;font-size:14px;">------ 本文结束 ------</div>
  {% endif %}
</div>

代码添加位置如图:
passageendans

建议直接修改home/scaffolds/post.md模板文件

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LionWY picture LionWY  ·  3Comments

bingstyle picture bingstyle  ·  3Comments

jwwangchn picture jwwangchn  ·  3Comments

chy9002 picture chy9002  ·  3Comments

iTofu picture iTofu  ·  4Comments