Skip to content

A metalsmith plugin to load global metadata from files.

Notifications You must be signed in to change notification settings

contentascode/metalsmith-metadata

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metalsmith-metadata

A metalsmith plugin to load global metadata from files.

Supports .json, .yaml and .csv data.

Installation

$ npm install metalsmith-metadata

CLI Usage

Install via npm and then add the metalsmith-metadata key to your metalsmith.json plugins. Each key in the dictionary of options will be the key mixed into the global metadata, like so:

{
  "plugins": {
    "metalsmith-metadata": {
      "authors": "./path/to/authors.json",
      "categories": "./path/to/categories.yaml",
      "things": "./path/to/things.csv"
    }
  }
}

Javascript Usage

Pass the options to Metalsmith#use:

var metadata = require('metalsmith-metadata');

metalsmith.use(metadata({
  authors: './path/to/authors.json',
  categories: './path/to/categories.yaml',
  things: './path/to/things.csv'
}));

License

MIT

About

A metalsmith plugin to load global metadata from files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.6%
  • Makefile 2.4%