有没有nodejs模板引擎像PHP Smarty一样支持模板继承功能?
{block name=head}
default layout content
{/block}
{block name=head}
if page have customize the content it display the customize content, otherwise display the layout content
{/block}
最佳答案
试试 dust.js 的 LinkedIn 分支:https://github.com/linkedin/dustjs
它看起来像这样:
{+head}default layout content{/head}
dust.js 还支持以下内容: - 异步/流式操作 - 浏览器/Node 兼容性 - 扩展的 Mustache/ctemplate 语法 - 干净的低级 API - 高性能 - 可组合模板
关于node.js - 有没有像PHP Smarty一样支持模板继承功能的nodejs模板引擎?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16103334/