Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

metalsmith-drafts

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-drafts

A metalsmith plugin to hide drafts.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19
decreased by-45.71%
Maintainers
3
Weekly downloads
 
Created
Source

Metalsmith Drafts

npm version code style: prettier metalsmith: plugin

Build Status

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:

{
  "plugins": {
    "metalsmith-drafts": true
  }
}

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:

{
  "plugins": {
    "metalsmith-drafts": {
		"default": true
	}
  }
}

Javascript Usage

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.

Default value for draft

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 = require('metalsmith-drafts');

metalsmith.use(drafts( {
	default: true
}));

License

MIT

FAQs

Package last updated on 30 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc