Metalsmith plugin to convert jade files.
npm install --save metalsmith-jade
Pass options
to the jade plugin and pass it to Metalsmith with the use
method:
var Metalsmith = require('metalsmith')
var jade = require('metalsmith-jade')
var metalsmith = new Metalsmith(__dirname)
.use(jade({
pretty: false,
locals: {
postName: 'good post name'
},
filters: {
foo: function (block) {
return block.replace('foo', 'bar')
}
}
}))
You can also use the plugin with the Metalsmith CLI by adding a key to your metalsmith.json
file:
{
"plugins": {
"metalsmith-jade": {
"pretty": false
}
}
}
All options are passed directly to jade. If options
has a locals
key, that will be passed along to jade.
any of the options
parameters for jade
with the additional plugin specific properties below:
Name | Type | Details | Default |
---|---|---|---|
useMetadata |
Boolean |
Expose Metalsmith's global metadata to the Jade template. | false |
locals |
Object |
Pass additional locals to the template | {} |
filters |
Object |
register functions to be used as template filters | {} |
Donations are welcome to help support the continuous development of this project.