【问题标题】:How to use markdown code highlighting for Liquid in JekyllRB?如何在 JekyllRB 中为 Liquid 使用 markdown 代码突出显示?
【发布时间】:2020-08-01 21:34:49
【问题描述】:

使用 JekyllRB/Rouge,如何突出显示(但不解释)markdown 文件中的 Liquid 代码?

IE:

我有一个降价文件:

Blah blah blah, my cool post... here's some code:

```liquid
{% assign variableName = 'test' %}
```

在生成的 HTML 中,我想查看实际代码,而不需要 Jekyll 在 markdown 文件中对其进行解释。

【问题讨论】:

    标签: jekyll liquid rouge


    【解决方案1】:

    我想通了。

    使用{% raw %} Liquid 标签。

    IE:

    ```
    {% raw %}
      {{ somevariablewewanttoshow }}
    {% endraw %}
    ```
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-09-14
      • 2023-03-23
      • 2022-06-25
      • 1970-01-01
      • 1970-01-01
      • 2013-12-16
      • 2019-05-21
      • 1970-01-01
      相关资源
      最近更新 更多