如何从液体模板(Jekyll)呈现Handlebars标记 [英] How to render Handlebars markup from a Liquid template (Jekyll)
本文介绍了如何从液体模板(Jekyll)呈现Handlebars标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Jekyll作为我们的博客,并且渲染Handlebars模板是一种痛苦。我们必须像这样转义:
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?
推荐答案
我找到了答案:
I found the answer:
{% highlight html %}
{% raw %}
<div>{{code}}</div>
{% endraw %}
{% endhighlight %}
这篇关于如何从液体模板(Jekyll)呈现Handlebars标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文