Skip to content

Instantly share code, notes, and snippets.

@muya
Created October 6, 2014 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muya/8785e948688a49d83b14 to your computer and use it in GitHub Desktop.
Save muya/8785e948688a49d83b14 to your computer and use it in GitHub Desktop.
Escaping Liquid Template Tags in Jekyll
{% highlight html %}
{% raw %}{% if post.excerpt %}{% endraw %}
{% raw %}{{ post.excerpt }}{% endraw %}
{% raw %}{% else %}{% endraw %}
{% raw %}{{ post.content | truncatewords:30 }}{% endraw %}
{% raw %}{% endif %}{% endraw %}
{% endhighlight %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment