A blog data generator for blog.bouzuya.net.


License
MIT
Install
npm install @bouzuya/kraken@4.0.2

Documentation

kraken

kraken: A blog data generator for blog.bouzuya.net.

See: bouzuya/blog.bouzuya.net

Installation

$ npm install @bouzuya/kraken

Usage

$ kraken build private/ public/  # private/ (md) -> public/ (json & xml)
$ kraken start public/           # run server

kraken build

$ # before
$ cat data/2014/01/2014-01-01.md
i love munchkin.

$ cat data/2014/01/2014-01-01.json
{
  "minutes": 20,
  "pubdate": "2014-01-01T23:59:59+09:00",
  "tags": [
    "misc"
  ],
  "title": "She has very short legs"
}

$ # pre-render
$ kraken build data dist

$ # after
$ cat dist/2014/01/01.json
{"data":"i love munchikin.","date":"2014-01-01","minutes":20,"html":"<p>i love munchikin.</p>\n\n","pubdate":"2014-01-01T23:59:59+09:00","tags": ["misc"],"title": "She has very short legs"}

$ # create same files in some paths
$ diff dist/2014/01/01.json dist/2014/01/01/index.json
$ diff dist/2014/01/01.json dist/2014/01/01/diary.json
$ diff dist/2014/01/01.json dist/2014/01/01/diary/index.json

kraken start

$ cat dist/2014/01/01.json
{"data":"i love munchikin.","date":"2014-01-01","minutes":20,"html":"<p>i love munchikin.</p>\n\n","pubdate":"2014-01-01T23:59:59+09:00","tags": ["misc"],"title": "She has very short legs"}

$ kraken start dist/

$ curl http://localhost/2014/01/01.json
{"data":"i love munchikin.","date":"2014-01-01","minutes":20,"html":"<p>i love munchikin.</p>\n\n","pubdate":"2014-01-01T23:59:59+09:00","tags": ["misc"],"title": "She has very short legs"}

Document

See doc/

Badges

Travis CI

License

MIT

Author

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