transform-yaml-markdown
transform a folder of markdown files with yaml frontmatter to html
Installation
npm i transform-yaml-markdown
Usage
transform-yaml-markdown <source> <destination> [render] [postRender]
The render
and postRender
functions should be exported as common.js functions.
render
gets a data
object passed with the meta data and raw markdown from the current file, a collection of all other files in the current directory and a collection of all files. It should return a Promise that fulfills with the rendered HTML.
example: render.js
module { return Promise;};
postRender
receives a collection of rendered files including a renderedPath
property and should also return a Promise that fulfills whenever your post render hook is done.
example: post-render.js
module { console; return Promise;};
By default the command tries to load render.js
and post-render.js
from the current working directory if not specified.
LICENSE
The MIT License (MIT) Maximilian Hoffmann