1.1.0 • Published 9 years ago
jekyll-meta-from-markdown v1.1.0
jekyll-meta-from-markdown
Create Jekyll Front Matter from single markdown contents.
Installation
npm install jekyll-meta-from-markdownUsage
var jekyllMatter = require("jekyll-meta-from-markdown");
jekyllMatter(input); // => outputinput
# Title
test text
* item 1
* item 2output
---
layout: post
title: "Title"
date: 2014-09-08T21:38:00.000Z
---
test text
* item 1
* item 2Options
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); // => outputdate: {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