express-hbsc

1.5.8 • Public • Published

ExpressJS Handlebar Middleware

This is a middleware for ExpressJS. It has inbuild [handlebar helpers] (https://github.com/assemble/handlebars-helpers). Some of the noteable features are layout, partials, comparisons.

Install

npm install express-hbsc --save

Add to your middleware

var Handlebars = require("handlebars");
var express = require("express");

// Add custom helpers
Handlebars.registerHelper("")

var app = express();

// Pass Handlebars Instance;


app.set("views", "app/views");
app.set("view engine", "hbs");
var Hbsc = require("express-hbsc")(app, Handlebars);

app.engine("hbs", Hbsc.render);

Layouts & Partials

Any dir in your view path with dir name _partial and files in the dir will be registered as partial. Checkout the example app.

Readme

Keywords

Package Sidebar

Install

npm i express-hbsc

Weekly Downloads

1

Version

1.5.8

License

MIT

Last publish

Collaborators

  • munichlinux