如何在(内联)代码突出显示中使用Jekyll代码?

ors*_*iro 3 liquid jekyll

我如何{{ post.date | date: "%H:%M %p - %-d %b %y" }}在代码突出显示中使用?

到目前为止我找到的唯一方法是使用{% raw %}{{ post.date | date: "%H:%M %p - %-d %b %y" }}{% endraw %}.但是,它会将代码段显示为无格式文本,而不是使用正确的内联代码突出显示.

如果我使用

`{{ post.date | date: "%H:%M %p - %-d %b %y" }}`
Run Code Online (Sandbox Code Playgroud)

然后呈现代码而不是显示为代码.

小智 6

{% highlight html %}
{% raw %}
  {% include google_analytics.html %}
{% endraw %}
{% endhighlight %}
Run Code Online (Sandbox Code Playgroud)