2.0.1 • Published 7 years ago

@bouzuya/myjekyll v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

myjekyll

A Jekyll-like Markdown parser for bouzuya

Installation

$ npm install @bouzuya/myjekyll

Usage

var jekyll = require('myjekyll');

var site = jekyll('./data/**/*.md', {}); // ./data/2015/2015-01-01-title.md

// All tags ['tag1', 'tag2']
console.log(site.tags());
// All tags and counts { tag1: 1, tag2: 1 }
console.log(site.tagCounts());
// All entries [{ file: '2015-01-01-title', title: 'hello', content: 'Hel ... }]
// properties:
//   file: filename (without extension)
//   content: raw markdown (without HTML compile)
//   <others>: meta data written by yaml
console.log(site.entries());
// Filtering by tags [...]
console.log(site.entries({ tags: ['tag1'] }));
---
pubdate: "2015-01-01T23:59:59+09:00"
title: hello
tags: [tag1, tag2]
---
Hello, [bouzuya](http://github.com/bouzuya/).

Badge

Travis CI

License

2.x

MIT

<1.0.0

ISC

Author

bouzuya <m@bouzuya.net> (http://bouzuya.net)