方法一:添加文章结束标记
最简单的方法
在主题配置hexo\themes\next\layout\_macro下的post.swig添加下面的代码
1 | {#####################} |
方法二:每篇文章末尾统一添加“本文结束”标记
新建 passage-end-tag.swig 文件
在路径 \themes\next\layout_macro 中添加passage-end-tag.swig` 文件,其内容为:
1 | <div> |
修改 post.swig 文件
在 \themes\next\layout_macro\post.swig中,post-body之后,post-footer` 之前添加如下代码(post-footer之前两个DIV):
1 | <div> |
在主题配置文件中添加字段
在主题配置文件 _config.yml 中添加以下字段开启此功能:1
2
3# 文章末尾添加“本文结束”标记
passage_end_tag:
enabled: true
完成以上设置之后,在每篇文章之后都会添加“本文结束”标记。