frontmatter
A simple YAML frontmatter parser.
Installation
$ npm install frontmatter
Usage
To parse the YAML frontmatter from a string:
var frontmatter = ;var parsed = ;
As in Jekyll, the YAML frontmatter should be delimited with triple-dash lines and defined at the beginning. For example:
---title: Welcome--- Hello!
In this case, the parsed
object would be:
For untrusted source, the safeLoad
option should be used:
;
Tests
$ npm install
$ npm test
License
MIT