1

I want to write {{ site.url }} on the code snippet of my Jekyll blog. But unfortunately it shows my username.github.io in the code snippet. How can I avoid this problem and show {{ site.url }} in the code snippet?

marcanuy
  • 23,118
  • 9
  • 64
  • 113
Arun
  • 343
  • 3
  • 12

1 Answers1

0

To avoid Jekyll processing a template tag surround it with {%raw%}..{%endraw%}, for example:

{% raw %}
~~~ liquid
{{ site.url }}
~~~
{% endraw %}

Raw temporarily disables tag processing. This is useful for generating content (eg, Mustache, Handlebars) which uses conflicting syntax.

marcanuy
  • 23,118
  • 9
  • 64
  • 113