shannonmoeller / handlebars-layouts

Handlebars helpers which implement layout blocks similar to Jinja, Nunjucks (Swig), Pug (Jade), and Twig.

Home Page:http://npm.im/handlebars-layouts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of using it with express-handlebars

Kostanos opened this issue · comments

Hi, is this module still up to date?

Can you show the example of how to use it with express-handlebars, if they are compatible.
PS. I use express-handlebars this way:

    this.app.engine('.hbs', exphbs({extname: '.hbs'}));
    this.app.set('view engine', '.hbs');
    this.app.set('view options', { layout: 'main' });

But having the issue of adding handlebars-layouts to it.

The following doesn't work, and gives me error - Missing helper "extend", Missing helper "block"

    layouts.register(handlebars);
// or
    handlebars.registerHelper(layouts(handlebars));

Thank you.