I am using GitHub Pages for my project page.
The project is a simple programming language and I need to write examples code snippets in the documentation. My language needs to use {%
and %}
literals quite often. In a .md
file I wrote the following text:
Syntax: `{%=EXPRESSION%}`
I see that GitHub tried to interpret this text as a Liquid template expression and It could not build the page. Furthermore, I got an email about the page build failure.
The page build failed for the `master` branch with the following error:
The tag `{%=EXPRESSION%}` on line 4 in `Functions.md` was
not properly closed with `%}`. For more information, see
https://help.github.com/articles/page-build-failed-tag-not-properly-terminated/.
I do not want my markdown files to be parsed as Liquid templates. I just want these code examples presented as written without being evaluated.
- How can I escape the
{%
literals?- I tried writing
{
but it did not translate to open curly bracket character. - I also tried writing
{<i>% ... %</i>}
everywhere but then the<i>
html tags did get escaped and the html code became visible in the output.
- I tried writing
- Is there a way to disable Liquid in a GitHub project page?
Thank you!