This blog is my third try to write blogging engine. First two was really naive because I tried to implement "something like..." (tumblr, blogger). It was wrong way. Keeping something not-geeky (like tumblr) in mind kills true soul of true geeky blogging engine.
The mix of tools I use to build this blog:
- git - for versioning and using GutHub as persistence
- vim - for editing articles
- railwayjs (express, ejs, bootstrap) (less then 100 lines of code for now)
Why not use wordpress or any alternative? I use my own because:
- it's fastest engine in the world (because it static or generated by node)
- it's bulletproof. There's nothing to hack. It's not hackable (of course you still can hack github, but it's not my war because I'm not working on GH)
- it's gave others access for article sources for fixing
- it's tiny, not overengineered yet
And the last point: because I can use my own, and it will be better than any other engine. For me. At least.
My typical blogging workflow:
- Type in console
railway generate article Title of my ideato get
./db/content/articles/title-of-my-idea.mdwith some contents in it:
Title: Title of my idea Date: 21 Jun 2012 Status: draft
- I write something and add this file to git: git add db/content
- I run local server using
- And visit
- When I finished final tuning I push commits from
- Post-receive hook on github triggers
POST http://anatoliy.in/updatewhich is just
git submodule update --initand got updated site
This flow also allows multiple authors to work on the same blog. And we doesn't need coding for users and permissions management because all of this kindnessly provided by github.
Structure of document
The structure of article is simple: beginning of file is
head (pair of
key-values separated with colon), after blank line begins post body. First
paragraph of post body is introduction (can be printed out in index, or, maybe
designed separately). Every key listed in head accessible while rendering
template. Every site-wide variable listed in
db/content/site.yml file and also
accessible in views and layouts.
Any kind of customizations available. From views/layout to site structure and behavior. When core is 100-lines long it's pretty easy to customize.