0.1.3 • Published 9 years ago
metalsmith-inc v0.1.3
metalsmith-inc
A metalsmith plugin to include partials.
Installation
$ npm install metalsmith-inc
CLI Usage
Use the following in your metalsmith.json
file (e.g. the defaults are displayed). Be sure to read more about defining a RegExp pattern as a string and the normal string escaping rules that apply.
{
"plugins": {
"metalsmith-inc": {
"directory": ".",
"pattern": "^include (.*)"
}
}
}
Javascript Usage
var inc = require('metalsmith-inc');
metalsmith.use(inc({
directory: "docs/partial",
pattern: "^custom (.*)"
}));
Example
---
title: Sample
---
# Exploring Partials
include partial-abc.md
include partial-xyz.md
# More Markdown
A markdown paragraph
License
MIT