md-it-meta
v0.0.2
Published
Markdown-it Metadata as yaml for markdown documents
Downloads
411
Maintainers
Readme
md-it-meta
Markdown-it plugin to add YAML metadata
Install
npm install md-it-meta --save
Use
import MarkdownIt from 'markdown-it'
import meta from 'md-it-meta'
const Mate = mate([['---', '...'], ['---', '...']])
// Make new instance
const md = new MarkdownIt()
// Add markdown-it-meta
md.use(Meta)
const renderedDocument = md.render('<md with YAML>')
return {
document: renderedDocument,
meta: md.meta
}
Features
Adds YAML to markdown documents to be used as meta data.
- Make Strings
- Make Arrays
- Make Objects
- All YAML is valid
Markdown
---
title: Welcome to Markdown-it-meta
keywords: markdown-it-meta
runs: 0
score: 0.0
demographics:
- {name: 'unknown'}
---
## Hello World