Picture of Michael Lee
:wave: Hey hey, I'm @michaelsoolee! I'm a full-stack developer, maker of one too many side projects and dad.

Rendering Liquid and Handlebars Expressions in Jekyll Code Blocks

Written on March 16, 2016

Sharing blocks of code is something that I do regularly on my site as well as other sites that I blog on.

Liquid (templating library for Jekyll) and Handlebars expressions (templating library found in Ember applications) use the curly braces to render content. When placing them in code blocks in Jekyll, Jekyll will by default try to render them as expressions instead of just raw code.

To fix this issue and render the code block with with Liquid and Handlebars expressions as code and not for Jekyll to try to render as content, you can use the {% raw %} liquid expression.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming, design and side projects with you. Sign up and I'll send you my articles straight to your email.