metalsmith-metaobject
v0.1.0
Published
A plugin to pass an object as metadata to metalsmith.
Downloads
15
Maintainers
Readme
metalsmith-metaobject 
A plugin to pass an object as metadata to metalsmith.
Note: If you want to load your metadata from external JSON files consider using metalsmith-metadata.
Installation
Install with npm.
npm install --save metalsmith-metaobjectCLI Usage
Install via npm and then add the metalsmith-metaobject key to your metalsmith.json plugins.
{
"plugins": {
"metalsmith-metaobject": {
"author": {
"name": "André König",
"github": "akoenig",
"email": "[email protected]"
},
"feed": "/atom.xml"
}
}
}Javascript Usage
Pass the options to Metalsmith#use:
var metaobject = require('metalsmith-metaobject');
metalsmith.use(metaobject({
author: {
name: 'André König',
github: 'akoenig',
email: '[email protected]'
},
feed: '/atom.xml'
}));Template usage
After passing the respective meta data object to metalsmith you are able to use it in your templates: Example for handlebars:
{{ author.name }}Changelog
Version 0.1.0 (20140427)
- Initial Release
Author
Copyright 2014, André König ([email protected])
