convert md into object data
root
└── models
└── blogs
├── apple.md
└── grape.md
└── kiwi.md
└── lemon.md
---
title: Apple is good
author: Jonathan Ive
date: 2018-04-15
tags:
- food
- fashion
---
# Apple is good
Apple is good for human.
const globMd2data = require('glob-md2data');
const models = await globMd2data('root/models');
console.log(models);
{
blogs: [
{
id: "apple",
title: "Apple is good",
date: "2018-04-15T00:00:00",
tags: [
"food",
"fashion"
],
body: "# Apple is good....."
},
{
id: "grape",
...
}
]
}