Discovers your template partials and registers them with Handlebars.
JavaScript
Latest commit 65173a5 Nov 3, 2015 @timdp 0.1.0
Permalink
Failed to load latest commit information.
.editorconfig Initial commit Nov 3, 2015
.gitattributes Initial commit Nov 3, 2015
.gitignore Initial commit Nov 3, 2015
LICENSE Initial commit Nov 3, 2015
README.md Initial commit Nov 3, 2015
index.js Initial commit Nov 3, 2015
package.json 0.1.0 Nov 3, 2015

README.md

metalsmith-discover-partials

npm Dependencies JavaScript Standard Style

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

Tim De Pauw

License

MIT