mirror of
https://github.com/vale981/metalsmith-layouts
synced 2025-03-05 17:41:39 -05:00
665 B
665 B
metalsmith-templates
A metalsmith plugin to render files with templates.
Installation
$ npm install metalsmith-templates
CLI Usage
Install the node modules and then add the metalsmith-templates
key to your metalsmith.json
plugins, like so:
{
"plugins": {
"metalsmith-templates": {
"engine": "handlebars",
"directory": "templates"
}
}
}
Javascript Usage
Pass options
to the templates plugin and pass it to Metalsmith with the use
method:
var templates = require('metalsmith-templates');
metalsmith.use(templates({
engine: 'swig',
directory: 'templates'
}));
License
MIT