Skip to content

Discovers your template partials and registers them with Handlebars.

License

Notifications You must be signed in to change notification settings

Trott/metalsmith-discover-partials

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Discovers your template partials and registers them with Handlebars.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%