Configure remark with YAML front-matter.
Installation
npm:
npm install remark-yaml-config
Usage
var remark = require('remark');
var config = require('remark-yaml-config');
var file = remark().use(config).processSync([
'---',
'remark:',
' commonmark: true',
' bullet: "*"',
'---',
'',
'1) Commonmark list (this is a parse setting)',
'',
'- Hello (this is a stringification setting)',
''
].join('\n'));
console.log(String(file));
Yields:
---
remark:
commonmark: true
bullet: "*"
---
1. Commonmark list (this is a parse setting)
* Hello (this is a stringification setting)
API
Passes the configuration at the remark
field as parse
and stringify settings.
Just like remark-comment-config, but YAML is
more visible.
License
MIT © Titus Wormer