如何在Jekyll中突出显示Jekyll Markup

Dan*_*ish 1 markdown liquid jekyll

我正在尝试使用由Kramdown解析的Markdown编写一个基于Jekyll的帖子,讲述我是如何在Jekyll的液体模板引擎中实现的.然而,当页面生成时,如果我打算渲染OR的实际降价是它应该显示为代码,那么Jekyll似乎感到困惑.

因此,如何在我的帖子中将以下代码段显示为突出显示的代码部分?

{% 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 %}
Run Code Online (Sandbox Code Playgroud)

man*_*ork 5

假设你有液体的词法分析器:

{% 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 %}
Run Code Online (Sandbox Code Playgroud)