Disable Liquid Rendering in Code Blocks
By Hideki Ishiguro at
Jekyll is a static site generator used by many people around the world.
I also launched the website using Jekyll recently.
When using curly braces in code blocks, they are rendered with liquid. So if you don't want to render them, you need to add one of the following in the markdown file.
render_with_liquid: false
to the Front Matter. (since Jekyll 4.0)
Option 1: Add the ---
title: Sample Title
render_with_liquid: false
---
<!-- code block here -->
Option 2: Surround a code block with {% raw %} {% raw %} and {% endraw %} {% endraw %}.
---
title: Sample Title
---
{% raw %}
<!-- code block here -->
{% endraw %}
Reference: https://jekyllrb.com/docs/liquid/tags/