Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问怎么在每篇文章末尾统一添加“本文结束”标记? #1039

Closed
wuxubj opened this issue Aug 11, 2016 · 2 comments
Closed

Comments

@wuxubj
Copy link
Contributor

wuxubj commented Aug 11, 2016

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

@wuxubj
Copy link
Contributor Author

wuxubj commented Aug 11, 2016

自己摸索出来了解决办法,遂自问自答了。
找到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

@fourstring
Copy link

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

@wuxubj wuxubj closed this as completed Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants