nodebars
Handlebars on node.
Install
npm i nodebars --save
Example
{{#extend "./layout"}} {{content "body" mode="append"}} {{/content}}{{/entend}}
Following helpers are supported:
- extend/block/content
- include
it's same to handlebars-layouts.
But you can just give a relative path for a layout file. like ./layout
.
So that's the difference.
API
normal node application
// the default Bars instancevar nodebars = ; // Bars classvar Bars = nodebarsBars; string result = Bars#;
Bars class init options
- enableCache : whether enableCache for file reading
- extname : the default file extension, default to
.html
express
var app = ;app;
koa
var app = app;
License
most code are taken from handlebars-layouts
handlebars-layouts License
MIT © 2015 Shannon Moeller me@shannonmoeller.com
project License
MIT © 2015 Magicdawn http://magicdawn.mit-license.org