{{ {% include intro.md %} | truncatewords: 3 }}
无论我如何设置花括号,都没有运气......
包括intro.md单独工作:
{% include intro_DE.md %}
这是一个vague note,包括在Jekyll下可能有点不同,但我仍然没有线索......
也许,我需要通过capture?
答案 0 :(得分:1)
我找到了捕获的解决方案。它不是很优雅:
{% capture foo %}{% include intro_DE.md %}{% endcapture %}
{{ foo | truncatewords: 20 }}
输出仍为markdown-ish(= good)。 “内联样式”,如粗体,下划线,删除线仍然有用。
### Headlines
和<html tags>
不要。 (可能是因为这种技术杀死了换行符......)