Skip to content

antiBaconMachine/metalsmith-json

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

metalsmith-json

Metalsmith plugin which parses json files and exposes their properties as metadata on the file object

Adding this plugin to your chain will result in any .json files being parsed, and their properties accumulated under a key (default: data) on the file object.

Blog post which led to creation of this plugin.

CLI Usage

in metalsmith.json

{
    "source": "src",
    "destination": "output",
    "plugins": {
        "metalsmith-json": {
        	"key": "foo"
        },
    }
}

Options

options.key

Type: String
Default value: data
Description: Key the json properties should be accumulated under

Development

There's a gruntfile for running jshint as well as unit and integration tests, please use it If you intend to submit pull requests.

About

Metalsmith plugin which parses json files and exposes their properties as metadata on the file object

Resources

Stars

Watchers

Forks

Packages

No packages published