frontmatter-markdown-loader

Webpack loader for Front Matter Markdown file to get front matter attributes, compiled markdown and React/Vue component which renders compiled markdown

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
frontmatter-markdown-loader
3.7.02 years ago6 years agoMinified + gzip package size for frontmatter-markdown-loader in KB

Readme

frontmatter-markdown-loader
npm GitHub Workflow Status
Webpack Loader for Front Matter files (.md) which returns:

This FrontMatter markdown file something.md:

```md

subject: Hello tags: - tag1 - tag2 ---
Title
message
is loadable as:

```js
import fm from "something.md"

fm.attributes // FrontMatter attributes => { subject: "Hello", tags: ["tag1", "tag2"] }
fm.html // Compiled markdown as HTML => "<h1>Title</h1>\n<p>message</p>\n"
fm.react // Component function for React which renders compiled markdown (Disabled as default)
fm.vue.component // Extendable component object for Vue which renders compiled markdown (Disabled as default)

📚 See the documentation for the further detail.
🔰 You have trouble with missing object?
The loader got the breaking changes in the latest major update. The article which you referred might premise on the old version. Check the installed version, if that says 1.x.y, see this guide.

Samples

Inspired/Referred

License