First Things First

A long time ago I told myself, I would start a blog and begin writing more. As time passed, and my blog did not see the light of day, I felt guilty. I figured now was the time to make good on my promise.

I started looking around at blogging engines that would meet my needs. The few blogging engines I looked at -- WordPress, Blogger, Jekyll and Tumblr -- did not meet my expectations. Although Tumblr did come close. I try to lead a simple life so naturally I wanted a simple platform.

I realized that all the good blogging engines out there started in a text editor at some point in time, right? Why not build my own blog from scratch? I only wanted a minimal setup that offered just the bare essentials.

I was fond of the Ruby programming language ever since I landed on its website and gave the "Ruby in Twenty Minutes" section a try. Sinatra was my number one choice to get up and running in no time. Sinatra is a light weight DSL for programming in Ruby.

I decided to use the modular style of Sinatra...

require 'sinatra/base'

class MyApp < Sinatra::Base
  # put code here for modular app ...
end

...rather than the classical form.

require 'sinatra'

class MyApp < Sinatra::Application
  # put code here for classical app ...
end

The modular form of Sinatra offers more flexibility for setting up your app, your way, versus the latter demonstrated above.

I also did not want to deal with a database so I decided to keep everything static and generate posts from markdown files. A hook was also thrown in to watch the markdown files for recent git commits and publish those updates directly to my website.

So, without further ado, here is a quick summary of the magic:

Up