hydecorp / hydejack

A boutique Jekyll theme for hackers, nerds, and academics
https://hydejack.com
Other
1.42k stars 804 forks source link

Liquid Warning #271

Closed MilovanTomasevic closed 3 years ago

MilovanTomasevic commented 3 years ago

When I want to writing (with `` ) thehighlight code` in my post, I get a warning:

<script src="{{ static_url('index.js') }}" type="text/javascript"></script>

warning:

Liquid Warning: Liquid syntax error (line 93): Expected end_of_string but found open_round in "{{ static_url('index.js') }}" in PATH/TO/MD_FILE

the current solution is:

{% raw %} code {% endraw %}

How would I solve that considering that it is the only warning I have?

Thanks for the reply. M

LazyRen commented 3 years ago

That's because Liquid tries to run the code with liquid syntax( {{ }}).

I think your current solution is the only solution you can get. I also uses the same solution. Tho I prefer to use

{%- raw -%}
code
{% endraw %}

to prevent unnecessary blank line.