0.0.3 • Published 3 years ago
snowpack-plugin-markdown-html v0.0.3
snowpack-plugin-markdown-html
Use markdown-wasm to build .md
files to HTML.
Usage
From a terminal, run the following:
npm install --save-dev snowpack-plugin-markdown-html
Then add this plugin to your Snowpack config:
// snowpack.config.json
{
"plugins": [
"snowpack-plugin-markdown-html"
]
}
Plugin Options
Name | Type | Description |
---|---|---|
render | "default" \| "nunjucks" \| ({html: string, frontmatter: Object, markdown: string, loadOptions: PluginLoadOptions, markChanged: () => void}) => string | (optional) Custom render function. markChanged can be used to bust Snowpack's cache of the .md file, e.g. if a layout file has changed. |
parseOptions | Object | (optional) See https://github.com/rsms/markdown-wasm#api |