0.0.3 • Published 3 years ago

snowpack-plugin-markdown-html v0.0.3

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

snowpack-plugin-markdown-html

npm

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

NameTypeDescription
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.
parseOptionsObject(optional) See https://github.com/rsms/markdown-wasm#api