1.1.0 • Published 5 years ago

decoupled-data-markdown v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

decoupled-data-markdown

Markdown with YAML data-source for decoupled and general usage.

Parses Markdown into HTML and supports full-featured YAML frontmatter.

Features

  • load markdown-docs by slug
  • parse markdown with Showdown
  • parse YAML-frontmatter with YAML
  • custom !!md YAML-tag for additional markdown fields in front-matter

Use-cases

  • simple document-based websites or blogs
  • metadata support for posts
  • complex data-structures for enriching pages
  • use frontmatter for complex page-builder structures

Usage

In config/SITE/router.js use:

import { decoupledMarkdownHandler } from 'decoupled-data-markdown';

module.exports.router = {
    routes: [
        {
            method: 'GET',
            route: '(.*)',
            handler: decoupledMarkdownHandler,
        },
    ]
};
1.1.0

5 years ago

1.0.0

5 years ago