metalsmith-partial
A metalsmith plugin for a partial
This plugin provide 'partial' helper to include other templates. You can use any templating engine supported by consolidate.js.
Installation
$ npm install metalsmith-partial
Example
Source file src/index.html
:
---title: The title---The contents {%- @partial('foobar.html') %}
Partial partials/foobar.html
:
This is a partial.
Build file build.js
:
var metalsmith = ;var partial = ;var templates = ; source'./src' ;
Results in dist/index.html
:
The contents This is a partial
License
MIT