我正在尝试写一篇基于Jekyll的帖子,使用kramdown解析的Markdown,讲述我是如何在Jekyll的液体模板引擎中实现一些东西的。然而,当页面生成时,Jekyll似乎对我想要呈现的它的实际markdown或者它应该被显示为代码感到困惑。
因此,我如何才能使下面的代码片段在我的帖子中作为突出显示的代码部分出现?
{% for post in paginator.posts %}
<div class="author">{{ post.date | date_to_string }}</div>
<h3><a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></h3>
<div class="content">
{{ post.content | split:"<!--break-->" | first }}
</div>
<b><a href="{{ BASE_PATH }}{{ post.url }}">continue reading >></a></b>
<hr/>
{% endfor %}发布于 2012-07-24 14:16:17
假设你有lexer for Liquid:
{% highlight liquid %}
{% raw %}
{% for post in paginator.posts %}
<div class="author">{{ post.date | date_to_string }}</div>
<h3><a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></h3>
<div class="content">
{{ post.content | split:"<!--break-->" | first }}
</div>
<b><a href="{{ BASE_PATH }}{{ post.url }}">continue reading >></a></b>
<hr/>
{% endfor %}
{% endraw %}
{% endhighlight %}https://stackoverflow.com/questions/11623349
复制相似问题