[英]Jekyll: how to not interpret jekyll / ruby lines in a code snippet (rouge)?
我在 Jekyll 帖子中有這段代碼:
{% highlight html linenos %}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
{% include head.html %}
<body>
[...]
</body>
</html>
{% endhighlight %}
我希望例如在呈現代碼段時不會解釋{% include head.html %}
行。
帶環繞碼
{% raw %}
和
{% endraw %}
如果您使用包含花括號的語言,您可能需要在代碼周圍放置 {% raw %} 和 {% endraw %} 標簽。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.