jekyll-meta-from-markdown
Create Jekyll Front Matter from single markdown contents.
Installation
npm install jekyll-meta-from-markdown
Usage
var jekyllMatter = require("jekyll-meta-from-markdown");
jekyllMatter(input); // => output
input
# Title
test text
* item 1
* item 2
output
---
layout: post
title: "Title"
date: 2014-09-08T21:38:00.000Z
---
test text
* item 1
* item 2
Options
jekyll-meta-from-markdown
can accept options object as seconde argument.
var jekyllMatter = require("jekyll-meta-from-markdown");
var options = {
date : new Date()
}
jekyllMatter(input, options); // => output
date
: {Date} - Date objectauthor
: {String} - author nametags
: {Array} - strings of tag names for the article
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
License
MIT