1
votes

I'm trying to have a Jekyll site hosted on Github, and it will have a lot of code blocks that have code similar to Liquid templates. Which is problematic because Jekyll tries to render it, even though whatever variable or function doesn't exist

I know it's possible to escape using {% raw %} ... {% endraw %}, but is there a way to make Jekyll just always compile code raw? I don't think I'll ever need to actually use Jekyll's functionality in a code block, and I'd rather stick to normal markdown syntax.

1

1 Answers

0
votes

but is there a way to make Jekyll just always compile code raw?

Not really (I don't see any configuration to enable raw by defaultà, considering Jekyll has to interpret other Liquid templates outside of the code block.

As seen in jekyll issue 5549, {% raw %} remains the official solution.