Parse posts that are formated with Yaml and Markdown.
npm install --save readpost
Meta is Yaml, Content is Markdown:
title: Hello World
categories:
- life
- random
---
Tomorrow is another **day**, oh uptown funk you up.
Usage:
const readpost = require('readpost');
const post = fs.readFileSync('./post.md', 'utf8');
const data = readpost(post);
// output:
{
meta: Object,
content: String
}
MIT © EGOIST