christopherlovell
christopherlovell

Reputation: 4159

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

I have a GitHub pages site running Jekyll. I want to write a code block in a blog post, with the following content:

{% include file.html %}

Unfortunately Jekyll is reading this literally and including the referenced files content, i.e. the content of file.html. How do I explicitly tell Jekyll that this line should not be executed?

Upvotes: 5

Views: 359

Answers (1)

David Jacquel
David Jacquel

Reputation: 52809

Use the raw tag.

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

Upvotes: 3

Related Questions