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

metalsmith-default-values

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith-default-values

A metalsmith plugin for setting default values for frontmatter metadata.

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

metalsmith-default-values

npm version Build Status bitHound Dependencies

Metalsmith Plugin for setting default front-matter metadata

Installation

npm install -S metalsmith-default-values

Note: -S switch saves the plugin to your package.json.

Usage:

1. Include the plugin

var default_values = require('metalsmith-default-values');

2. Use the plugin in your build pipeline

...
.use(default_values([
    {
        pattern : 'posts/*.md',
        defaults: {
            layout: 'post.hbs'
        }
    },
	{
		pattern : 'diary/*.md',
		defaults: {
			layout : 'diary.hbs',
			private: true
		}
	}
]))
...

3. Profit

GL HF

Node versions

Because Joi > v6 uses ES6 syntax this runs on NodeJS v4 and above.

License - GPL-3.0

metalsmith-default-values is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

metalsmith-default-values is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with metalsmith-default-values. If not, see http://www.gnu.org/licenses/.

Keywords

FAQs

Package last updated on 07 Aug 2017

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