GitHub 带有 {% include ... %} 代码块的风味降价

GitHub flavored markdown with an {% include ... %} code block

我有一个 GitHub 页站点 运行 Jekyll。我想在博客post中写一个代码块,内容如下:

{% include file.html %}

不幸的是,Jekyll 正在按字面意思阅读并包括引用的文件内容,即 file.html 的内容。如何明确告诉 Jekyll 不应该执行此行?

使用 raw 标签。

{% raw %}{% include file.html %}{% endraw %}