0.1.0 • Published 12 years ago
metalsmith-untemplatize v0.1.0
metalsmith-untemplatize
A Metalsmith plugin to extract untemplatized file contents.
Use Case
This can be pretty useful when you need to access file contents without any template rendering in other templates (such as RSS/Atom feeds).
Installation
$ npm install --save metalsmith-untemplatizeCLI Usage
{
"plugins": {
"metalsmith-untemplatize": {
"key": "untemplatized"
}
}
}API Usage
var untemplatize = require('metalsmith-untemplatize');
metalmisth.use(untemplatize({
key: 'untemplatized'
}));Plugin Order
Be sure to add this plugin before metalsmith-templates and after any rendering content plugin like metalsmith-markdown.
Example:
Metalsmith(__dirname)
.use(markdown())
.use(untemplatize())
.use(templates('handlebars'))
.build();Options
key
The key name which stores the untemplatized content. Defaults to untemplatized.
Feel free to use your own (example: content, body, banana or anything else).
License
MIT
0.1.0
12 years ago