alshedivat / al-folio

A beautiful, simple, clean, and responsive Jekyll theme for academics
https://alshedivat.github.io/al-folio/
MIT License
9.84k stars 10.68k forks source link

double curly bracket in markdown breaks Jeklly build in github.io deployment #2504

Closed kevinli-webbertech closed 2 weeks ago

kevinli-webbertech commented 2 weeks ago

Have you checked that your issue isn't already filed?

Bug description

double curly bracket in markdown breaks Jeklly build in github.io deployment

How to reproduce the bug

Make a .md file, and the .md file contains shell expression,

{{1..3},{7..9}} is an example of shell feature

Error messages and logs

To use retry middleware with Faraday v2.0+, install faraday-retry gem
Liquid Exception: Liquid syntax error (line 74): Variable '{{1..3}' was not properly terminated with regexp: /}}/ in blog/md/ref/linux/linux_shell.md
/usr/local/bundle/gems/liquid-4.0.4/lib/liquid/block_body.rb:[13](https://github.com/kevinli-webbertech/kevinli-webbertech.github.io/actions/runs/9493104568/job/26161311609#step:4:14)6:in `raise_missing_variable_terminator': Liquid syntax error (line 74): Variable '{{1..3}' was not properly terminated with regexp: /\}\}/ (Liquid::SyntaxError)

What operating system are you using?

Linux

Where are you seeing the problem on?

Deployed site

More info

image

Not entirely sure if this report finds its proper place.

Thanks!

george-gca commented 2 weeks ago

When using double curly code ({{ ... }}) on a markdown file that is not a Jekyll expression, you should surround it with {% raw %} and {% endraw %} tags. Take a look at Jekyll documentation. We do it quite a few times in our code to post the example code that will generate the desired output in blog posts, like in the jupyter one.