metalsmith-discover-partials
v0.1.2
Published
Discovers your template partials and registers them with Handlebars.
Downloads
768
Readme
metalsmith-discover-partials
Discovers your template partials and registers them with Handlebars.
Usage
In metalsmith.json
:
{
"plugins": {
"metalsmith-discover-partials": {
"directory": "partials",
"pattern": "/\\.hbs$/"
}
}
}
Using Metalsmith's API:
var discoverPartials = require('metalsmith-discover-partials')
require('metalsmith')(__dirname)
.use(discoverPartials({
directory: 'partials',
pattern: /\.hbs$/
}))
.build()
The displayed values for directory
and pattern
are the defaults. If you
don't need to change them, you can just leave them out.
Author
License
MIT