If you use double curly braces in code blocks in markdown with Jekyll. They just won’t show up.

Enclose the code block in raw and endraw tags. Like this:

{% raw % }

some code here

{% endraw % }

Writing the previous line and make it appear correctly in this blog post sent me to a 4-hour bottomless pit of googling. I think it’s not possible to show the raw/endraw code in a code block using the raw/endraw tags. Basically I am trying to show:

open raw tag
some code here
close raw tag

This is mostly used to show code that has double curly braces:

{ {site.baseurl} }/assets/images/

I have also seen some strange behavior when adding a JavaScript code block and using Safari on mobile in Reader view mode. The HTML content is not displayed correctly. I thought that maybe my Jekyll template was broken.

Here are other resources I read: