可以包含其他模板的节点模板引擎? [英] Node template engine that can include other templates?
本文介绍了可以包含其他模板的节点模板引擎?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
开始进入节点,但努力选择模板引擎.
Starting to get into node but struggling to pick a template engine..
有没有一个引擎可以在同一枝条罐中包含其他模板?
Is there an engine out there that can include other templates in the same twig can?
EG :
{% include 'template.html' with {'foo': 'bar'} %}
推荐答案
我最后同意了: http://paularmstrong.github.io/swig/
我非常喜欢js..绝对很棒,并且完全满足您对树枝的期望.
I is a port of twig to js.. absolutely awesome and does exactly what you would expect from a twig.
更新:自不赞成使用以来,它已被广泛使用: https://mozilla.github.io/nunjucks/
UPDATE: It swig ha since been deprecated in favor of: https://mozilla.github.io/nunjucks/
这篇关于可以包含其他模板的节点模板引擎?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文