Catlog is a static site generator. It allow users to use markdown syntax to write blog article and publish it with html format. Catlog has a inner test server to allow you see your blog after write it. It also support for self theme and plugin definition.
Live demo blog.cattail.me
First install catlog with npm:
$ npm install -g catlogjs
This will install catlog globally on your system so that you can access the catlog command from anywhere. Once that you can view help:
$ catlog -h
it will tell you how to use catlog.
Create a directory for your website, get inside of it, and initialize an empty catlog project:
$ mkdir my-website$ cd my-website$ catlog init
This creates a skeleton site with a basic set of templates.
Want to create an new blog?
$ catlog publish
then you will need to provide some info for it.
write your article name: 文章名称choose article category: 选择已创建类别，或者创建新的类别（这会给你在网站上添加一个新的导航项)input new permalink title: 固定链接，为了美观，请尽量使用英文input author name: 文章作者名
when done, you will have a subdirectory in contents folder: contents/category_name/permalink_title.There will be a index.md and a meta.json file. The index.md is where you write your article, and the meta.json file holds some info of your article.
The catlog blog structure contain the meta info of articles, do not change the directory structure without knowning what it means.
publish command will handle this properly for you.
If you already have a lot of markdown article files and want to migrate them into catlog blog structure, run:
$ catlog migrate <path>
It will prompt lost meta information needed for every markdown files.
When you finish writing article and want to preview it on local server, you should run:
$ catlog preview [-s] [-a]options:-s [port]: start local server on port,the default port is 8080.-a: watch for file change and auto update--server [port]: the same effect as -s [port]--auto: the same effect as -a
Then you can build your site.
$ catlog build
This generates your site and places it in the build/ directory - all ready to be copied to your web server!
Catlog itself bring with three plugins:
In your website root directory, change settings.json
plugins field. Following is a example configuration file
Developed when working at ©Qudian Tech Inc.