Minimal blog engine for Git and Markdown enthusiasts
I made a new blog engine "Bitter". The main features are:
- Publish article by "git push"
- Write article in Markdown
- Suitable for text content
- Pure Node.js server
- Simple code base that you can easily hack on
The repository is on GitHub.
On the server side, do as follows. Please replace "blogdir" with your desired directory.
$ npm install -g bitter $ mkdir blogdir $ cd blogdir $ bitter setup
After setup completed, run the server. Specify listen port with environment variable PORT.
$ PORT=1341 bitter server
If you're going to use with nginx or Apache, configure them to use reverse proxy.
On the local machine, clone blogdir/notes.git.
$ git clone user@host:blogdir/notes.git
In the cloned repository on the local machine, write an article in Markdown, then save it as
git push to publish it.
$ mkdir -p 2013/05 $ echo "# Test\n\nHello World" > 2013/05/27-test.md $ git add . $ git commit -m "add test entry" $ git push origin master
Commit message has no effect on Bitter.
$ vim 2013/05/27-test.md $ git add -u $ git commit -m update $ git push origin master
$ git rm 2013/05/27-test.md $ git commit -m delete $ git push origin master
Put your static files under the directory that article resides. Those files can be referred to by relative path. For example, to embed 2013/05/images/winter.jpg, write following code in 2013/05/27-test.md.
If you put static files under "public" directory, those files can be referred to by absolute path. For example, to embed public/images/spring.jpg: