In my previous post (here) I talked about some of the requirements I had for a blogging engine. The general requirements boil down to just a couple of things. The blog must be easy to maintain and it shouldn't get in my way when trying to display complex examples.
Since I'm not really a huge fan of writing software that already exists I did some searching to see if anyone else had run into these issues. In my search I came across jeykll which is a blogging framework built on ruby. It fits my requirements almost perfectly, except for one major issue. I need a back end to build examples on. Often times my examples will have ajax based components, and I need a simple way to write code in a backend that can handle those requirements.
Full development stack
Simplifying the process
To make it easier to publish blog posts I've blatantly ripped off some ideas from jeykll. Most notably the idea of YAML Front Matter. Each post is a single html file with a yaml header followed by normal html. For example the header of this posts HTML file looks like this:
--- date: 04/08/2012 url: blog-engine title: New Blog Engine tags: [blog] ---
Git to the rescue.
Now that I have my post file format I can move on to other issues. How do I backup and deploy at once? Luckily this is a solved problem; since we're using nothing but flat files we can use git for both source control management and publishing.
Free hosting on Heroku
Since I am already using git for source control and mostly serving flat files I can simply do a:
git push heroku deploy:master
and we are live! Heroku gives out one free small instance per site so I don't even need to pay anything for hosting my blog; and if I need more resources, Heroku can automatically give me more with a few clicks of a button.
There is still a lot to do to make this really workable. I need to add paging, a commenting system (heard of DISQUS?), and an RSS feed. These are pretty minor to implement so they should be coming shortly. If you have any questions just reach out to me on my contact page and I'll get back to you.