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

unexpected output of excerpt #8

Closed
asakiasako opened this issue Jul 28, 2019 · 1 comment
Closed

unexpected output of excerpt #8

asakiasako opened this issue Jul 28, 2019 · 1 comment
Labels
good first issue Good for newcomers

Comments

@asakiasako
Copy link

truncate 貌似是按 md 或 html 源文件截取的,因此经常出现截取在标签内,造成错误的情况,例如:

屏幕快照 2019-07-28 23 23 26

这个截取在了 a 标签内,导致错误……

感觉只能取消 truncate,手动截取了,否则太不稳,出错几率挺高的……

@FromEndWorld
Copy link
Owner

FromEndWorld commented Jul 31, 2019

因为Jekyll的自动excerpt截取有时候不明原因失效,本来应该是第一个p,结果经常全文都是excerpt,所以我添加了truncate和手动截取的标记,在Config里可以修改,默认为<!-- more -->

根据自己的博文特点可以选择:

  • 去掉truncate(在index.html里 line 40),自动,有时候会发生全文变成摘要的情况,导致首页巨丑
  • 去掉truncate,手动,每篇文章自己加截取标记,效果完美,就是麻烦
  • 我的目前的做法,truncate配合手动,写以普通文字为主的po的时候就随它去,格式多代码多,有需要的时候手动添加<!-- more -->

欢迎提供更完美的解决方案!

@FromEndWorld FromEndWorld added the good first issue Good for newcomers label Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants