A Metalsmith plugin for adding metadata from an external source file
This plugin reads JSON files as external data sources to HTML files with the same name in the same directory.
Given a src directory with the following files:
├── src/
├── index.html
├── index.json
Use plugin in your Metalsmith build:
var Metalsmith = require('metalsmith');
var extMeta = require('metalsmith-external-metadata');
Metalsmith(__dirname)
.use(extMeta({
// options here
}));
index.json
will be rolled into the metadata for index.html
.
Type: String
Default: [ '.json' ]
Sets the list of extensions.
MIT © Anthony Castle