Skip to content

AnthonyAtZinid/metalsmith-register-partials

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metalsmith-register-partials

unstable

A Metalsmith plugin for registering Handlebars partials.

CLI Usage

Install via npm i AnthonyAtZinid/metalsmith-register-partials then add the metalsmith-register-partials key to your metalsmith.json plugins, something like so:

{
  "plugins": {
    "metalsmith-register-partials": {
      "directory": "partials"
	  "suffix": ".html"
    }
  }
}

This will register all files with the suffix .html in the directory partials (relative to your source) and use the path after partials and entire filename minus .html as the partial name.

Works for files in subfolders

Works in a metalsmith pipeline

License

MIT, see LICENSE.md for details.

About

A Metalsmith plugin for registering Handlebars partials.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%