Configure remark with YAML front-matter.
Installation
npm:
npm install remark-yaml-config
remark-yaml-config is also available as an AMD, CommonJS, and
globals module, uncompressed and compressed.
Usage
Dependencies:
var remark = require('remark');
var config = require('remark-yaml-config');
Process:
var doc = remark().use(config).process([
'---',
'remark:',
' commonmark: true',
' bullet: "*"',
'---',
'',
'1) Commonmark list (this is a parse setting)',
'',
'- Hello (this is a stringification setting)',
''
].join('\n'));
Yields:
---
remark:
commonmark: true
bullet: "*"
---
1. Commonmark list (this is a parse setting)
* Hello (this is a stringification setting)
API
Passes the configuration found in YAML front-matter
(under the remark
key) to remark.
License
MIT © Titus Wormer