我正在.github.io上写博客
正如Github所建议的那样,我使用的是Jekyll结构。我希望以Markdown的形式发布我的博客,但我也希望我的索引显示帖子的截断原始文本,而不显示和辅助符号。
我写了<div>{{ post.content |truncatehtml |truncatewords: 30 }}</div>
。它适用于localhost,但在我的博客http://piscesdream.github.io/
我该如何解决?
答案 0 :(得分:0)
看起来truncatehtml
功能正在提供插件,使用GitHub页面时不支持插件,尝试使用<div>{{ post.content | strip_html | truncatewords:30 }}</div>
之类的内容。