0.8.0 • Published 3 years ago

parcel-plugin-md-fm v0.8.0

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

parcel-plugin-md-fm

Parcel plugin for loading markdown with parsed frontmatter.

Install

With npm:

npm install parcel-plugin-md-fm --save-dev

With yarn:

yarn add --dev parcel-plugin-md-fm

Use

Importing:

import { content, data } from "./file.md";

If you get errors or red underlines in editors, add a markdown.d.ts file containing:

declare module "*.md" {
  const content: string;
  const data: object;
}

Test

Tests not implemented yet.

About

This uses the excellent gray-matter library under the hood which separates and then translates yaml or other frontmatter from a markdown file. See jonschlinkert/gray-matter for the exact result format.

Markdown is returned as a string (content) without further parsing so that you can use it with a parser/formatter of your choice like markdown-to-jsx (if you're using react).

0.8.0

3 years ago

0.6.0

3 years ago

0.5.9

4 years ago

0.5.4

4 years ago

0.5.0

4 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.0

6 years ago

0.1.15

6 years ago