{%= name %} {%= badge("fury") %}

Used by assemble, verb, and thousands of other projects!

v0.5.0 has breaking changes!

  • YAML is now parsed using the .safeLoad() method from js-yaml.

  • To parse coffee, CSON or javascript front matter, you must set options.eval to true.

  • stringify() has been renamed to toJSON()

  • stringifyYAML() has been renamed to toYAML()

Highlights

  • Reliable and battle-tested.

  • Will extract and parse:

  • Easy to add additional parsers! pull requests welcome!

TOC

Install

Usage

var matter = require('gray-matter');
console.log(matter('---\ntitle: foo\n---\nbar');
//=> {data: {title: 'foo'}, content: 'bar', orig: '---\ntitle: foo\n---\nbar'}

API

Options

Examples

Why?

Authors

License

Last updated