簡體   English   中英

Jekyll:如何不解釋代碼片段(胭脂)中的 jekyll/ruby 行?

[英]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 %} 標簽。

更多信息請訪問https://jekyllrb.com/docs/templates/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM