我如何使用例如{{ post.date | date: "%H:%M %p - %-d %b %y"}}
在代码高亮中?
到目前为止我发现的唯一方法是使用{% raw %}{{ post.date |日期:“%H:%M %p - %-d %b %y”}}{% endraw %}
。但是,它会将代码片段显示为未格式化的文本,而不是使用正确的内联代码突出显示。
如果我使用
`{{ post.date | date: "%H:%M %p - %-d %b %y" }}`
然后代码将被渲染而不是显示为代码。
最佳答案
{% highlight html %}
{% raw %}
{% include google_analytics.html %}
{% endraw %}
{% endhighlight %}
关于jekyll - 如何在(内联)代码突出显示中使用 Jekyll 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20568396/