Metalsmith Drafts
A metalsmith plugin to hide drafts.
Installation
$ npm install metalsmith-drafts
CLI Usage
Install via npm and then add the metalsmith-drafts
key to your metalsmith.json
plugins, like so:
Then in your files YAML front-matter add draft: true
.
In case you want to force all files to be set to draft: true
, use the following plugin-option:
Javascript Usage
Pass the plugin to Metalsmith#use
, like so:
var drafts = ; metalsmith;
Then in your files YAML front-matter add draft: true
.
draft
Default value for If you want to define a default value for draft
(in case they are not definied in the YAML front-matter, then use the plugin option default
:
var drafts = ; metalsmith;
License
MIT