Skip to content

themeleon/themeleon-mustache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Themeleon Mustache

Mustache 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-mustache": "1.*"
  }
}

Usage

Say we have the following theme structure:

views/
  foo/
    bar.mustache
  foo.mustache
  index.mustache
var themeleon = require('themeleon')();

// Use the Mustache mixin
themeleon.use('mustache');

// Or inject your own instance
themeleon.use('mustache', require('mustache'));

module.exports = themeleon(__dirname, function (t) {
  // Render index alone
  t.mustache('views/index.mustache', 'index.html');

  // Or include a partials object
  t.mustache('views/index.mustache', 'index.html', {
    foo: 'views/foo.mustache',
    'foo/bar': 'views/foo/bar.mustache',
  });

  // Or let the mixin resolve all `.mustache` files in `views`
  // Note: `.mustache` and `.mst` extensions are supported.
  t.mustache('views/index.mustache', 'index.html', 'views');
});

About

[DEPRECATED] Mustache mixin for Themeleon.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published