This package has been deprecated

Author message:

This is native with Themeleon 3.0

themeleon-handlebars

0.1.1 • Public • Published

Themeleon Handlebars

Handlebars mixin for Themeleon.

Warning: this repository/package is deprecated, template engines will be handled by consolidate.js in Themeleon 3.0.

Installation

In your package.json:

{
  "dependencies": {
    "themeleon": "1.*",
    "themeleon-handlebars": "1.*"
  }
}

Usage

Say we have the following theme structure:

views/
  foo/
    bar.handlebars
  foo.handlebars
  index.handlebars
var themeleon = require('themeleon')();
 
// Use the Handlebars mixin
themeleon.use('handlebars');
 
// Or inject your own instance
themeleon.use('handlebars', require('handlebars'));
 
module.exports = themeleon(__dirname, function (t) {
  // Render index alone
  t.handlebars('views/index.handlebars', 'index.html');
 
  // Or include a partials object
  t.handlebars('views/index.handlebars', 'index.html', {
    foo: 'views/foo.handlebars',
    'foo/bar': 'views/foo/bar.handlebars',
  });
 
  // Or let the mixin resolve all `.handlebars` files in `views`
  // Note: `.handlebars` and `.hbs` extensions are supported.
  t.handlebars('views/index.handlebars', 'index.html', 'views');
});

Readme

Keywords

none

Package Sidebar

Install

npm i themeleon-handlebars

Weekly Downloads

1

Version

0.1.1

License

Unlicense

Last publish

Collaborators

  • pascalduez
  • valeriangalliat