How to render Handlebars markup from a Liquid template (Jekyll)

允我心安 提交于 2019-12-05 13:38:45

问题


I am using Jekyll for our blog and rendering Handlebars templates is a pain. We have to escape like so:

{% highlight html %}
  <div>{{"{{code"}}}}</div>
{% endhighlight %}

It's fugly. Is there an easier way to do this?


回答1:


I found the answer:

{% highlight html %}
{% raw %}
  <div>{{code}}</div>
{% endraw %}
{% endhighlight %}


来源:https://stackoverflow.com/questions/14209942/how-to-render-handlebars-markup-from-a-liquid-template-jekyll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!