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

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

wuxubj opened this issue Aug 11, 2016 · 2 comments

Comments

@wuxubj
Copy link
Contributor

@wuxubj 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 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

@fourstring fourstring commented Aug 11, 2016

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

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.