A metalsmith plugin to hide drafts.
$ npm install metalsmith-drafts
Install via npm and then add the metalsmith-drafts
key to your metalsmith.json
plugins, like so:
{
"plugins": {
"metalsmith-drafts": true
}
}
Then in your files YAML front-matter add draft: true
.
Pass the plugin to Metalsmith#use
, like so:
var drafts = require('metalsmith-drafts');
metalsmith.use(drafts());
Then in your files YAML front-matter add draft: true
.
MIT