防止 Liquid 解析 Jekyll 中的某些文件
Prevent Liquid from parsing of certain files in Jekyll
我正在使用 Jekyll + Liquid + Markdown 生成 static html 页面。因此,这实际上是一个特定于 Jekyll 框架和 Liquid 模板生成器的问题,因为在我的一些 Markdown 文件中存在与 Liquid 冲突的语法。
有没有我可以暂时使用的快速但肮脏的解决方法来防止 Liquid 解析某些文件?
使用Raw:
Raw temporarily disables tag processing. This is useful for generating content (eg, Mustache, Handlebars) which uses conflicting syntax.
{% raw %}
In Handlebars, {{ this }} will be HTML-escaped, but
{{{ that }}} will not.
{% endraw %}
我正在使用 Jekyll + Liquid + Markdown 生成 static html 页面。因此,这实际上是一个特定于 Jekyll 框架和 Liquid 模板生成器的问题,因为在我的一些 Markdown 文件中存在与 Liquid 冲突的语法。
有没有我可以暂时使用的快速但肮脏的解决方法来防止 Liquid 解析某些文件?
使用Raw:
Raw temporarily disables tag processing. This is useful for generating content (eg, Mustache, Handlebars) which uses conflicting syntax.
{% raw %}
In Handlebars, {{ this }} will be HTML-escaped, but
{{{ that }}} will not.
{% endraw %}