Content-Length: 12921 | pFad | https://hmsk.github.io/frontmatter-markdown-loader/

frontmatter-markdown-loader

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

A markdown file something.md:

---
subject: Hello
tags:
  - tag1
  - tag2
---
# Title

message

is loadable as:

import fm from "something.md"

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 npmjs.org (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.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://hmsk.github.io/frontmatter-markdown-loader/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy