frontmatter-markdown-loader is the Webpack Loader for: FrontMatter (.md) which returns Compiled HTML + Attributes.

A markdown file

subject: Hello
  - tag1
  - tag2
# Title


is loadable as:

import fm from ""

fm.attributes //=> { subject: "Hello", tags: ["tag1", "tag2"] }
fm.html //=> "<h1>Title</h1>\n<p>message</p>\n"

And there are some convenience features for Vue stack 😉

# Setup

The module is published on (opens new window).

npm i -D frontmatter-markdown-loader
yarn add -D frontmatter-markdown-loader

# Configure Webpack

Add this loader setting to your Webpack's config.

  test: /\.md$/,
  loader: 'frontmatter-markdown-loader'

You can change test as you need.