0.1.0 • Published 8 years ago
remark-yaml-meta v0.1.0
remark-yaml-meta
Extract YAML front-matter from markdown.
Installation
npm:
npm install remark-yaml-meta
Usage
Dependencies:
var remark = require('remark');
var metaPlugin = require('remark-yaml-meta');
Process:
var file = remark().use(metaPlugin).process([
'---',
'foo:',
' bar: true',
'---',
''
].join('\n'));
Yields:
{
"foo": {
"bar": true
}
}
API
remark.use(yamlConfig)
Passes the configuration at the remark
field as parse
and stringify settings.
Just like remark-yaml-config, but the parsed object
is saved to the meta
property of the retuned VFile
.
License
0.1.0
8 years ago