Handlebars:
Template
{{#> layout}}
  {{#*inline "nav"}}
    My Nav
  {{/inline}}
  {{#*inline "content"}}
    My Content
  {{/inline}}
{{/layout}}
layout
[rename] [delete]
<div class="nav">
  {{> nav}}
</div>
<div class="content">
  {{> content}}
</div>
Preparation-Script
// Handlebars.registerHelper('loud', function(string) {
//    return string.toUpperCase()
// });
Input
null
Output
<div class="nav">
      My Nav
</div>
<div class="content">
      My Content
</div>
最后更新: 2020/2/25 16:23:24