Express.js view engine wrapper for handlebars.js, an extension of Mustache template language.
While Handlbars.js is already a Node.js module, it cannot be used directly as an Express.js view engine. This module will fill that role until Handlebars.js adds Express.js view engine support directly.
npm install hbs
To set hbs as default view engine:
app.set("view engine", "hbs");
See test/server
source code.
__get__
function is not supported within block helper functions.
- Version number bumped to 1.0.0 to match
Handlebars
version. Handlebars
is now loaded usingrequire
and is longer embedded.hbs.handlebarsPath
was removedregisterHelper
andregisterPartial
methods are exported.
Handlebars' block-helpers now needs to be in blockHelpers
(see example above) instead of locals
.