I started this blog to develop my writing ability as well as to make some use
of a domain name I purchased some time ago. Going from an initial
one page template, to a Python script generating a small static site, I realized I was
writing my own static site generator. While initially entertaining, it wasn't really what
I set out to do with this creative outlet.
Jekyll?
Reading about GitHub pages introduced me to Jekyll,
which I found to be an elegant take on static site generation. While other generators like
Blosxom are extremely powerful ( and highly tailored to blogging ), they
have more of a startup or conversion time investment required.
With Jekyll you don't need a configuration file or much boilerplate. A simple site can consist
of just a folder containing an index.[whatever markup you want] and a layout in the _layouts
sub-folder. Make sure that your index.[whatever markup you want] is topped off with
an appropriate header:
---
layout: post
title: Converting my Blog to Jekyll
categories: [Utilities, Ruby]
---
Which looks a little familiar... Upon running jekyll --server I am greeted with a preview of
my site running on WEBrick. Marvelous!
Customization
While the default behavior of Jekyll works pretty well, I had to do some digging on how to
replicate my posts by date and posts by tag lists. After some
searching I came across this great post on Bruce Cooper's blog
about exposing the posts as a tree by year and month. This greatly simplified the creation of
the posts by date list and gave me a jumping off point for sorting tagged posts.
With the resulting pages being:
Finalizing it
Having all my posts already in Markdown, finalization was as simple as installing the rdiscount gem,
updating the headers on my posts, running jekyll and uploading the finished _site directory.