The Digital Lumberjack

Hacking Code When Life Goes Digital

Posting with Jekyll


Post date 04 Sep 2011
Summary Exploring the old idea of static content generators
Filed under

Transform your text into a monster (Jekyll website)

I always knew I should be posting more on my blog, but it was always so alien to me. I managed to set up first a WordPress blog, shortly after I switched to Drupal and that was it, almost no more dedication.

The thing is that it was really painful to write posts. All these click here and click there, with all the content spread across a database. For some text oriented guy who love to keep his work clear and under control, that was unthinkable. I knew everything I created was going to be inside that database, but just thinking about extracting that info scared me off.

Finally I decided to give Jekyll a try. I could have also gone for Hyde, the Python remake of Jekyll, but I wanted to have some contact with Ruby again. One more reason for Jekyll is that it is very well supported by my favorite coding comunity: GitHub. Hence anything said by Tom Preston catches my attention.

In one day I've been able to switch from Drupal to Jekyll. There are still some rough edgeds to solve, but I managed to build an initial new theme, migrate my Disquss and Google Analytics account along several minor details. Right now I am very interested in playing with HAML and SASS just to find out what this Ruby people are up to.

All my posts will be now in a simple text file formated with Markdown and a YAML header for the meta-info. So far it is amazing having all my posts with a such clean separation from the content manager. Not only I am convinced that now my work is less dependent on one CMS, but I can use the tools I am more comfortable with.

Since a picture is worth a thousand words, just see yourself how one of my posts looks like (with lists, code blocks, quotes, links...) and think all that was rendered from such a lovely text file like this one. All my blog structure can also browsed.

All this time I have been killing flies with a cannon. Any static site is much faster than anything dynamically generated. At the time I chose Drupal over WordPress was because I wanted to learn a more powerful framework, but these are programmed in PHP and now I realize how much better any solution can be developed with Ruby or Python. A static site also means that I can go for cheaper hosting and I will have to play much more with Javascript. That is a good thing because my Javascript-fu is rusty. Every month that goes by I am more convinced that it is becoming a very valuable language that complements any web project.

Most of the time and for most of people a dynamic CMS will be the best solution. Once I had client for whom I migrated their site to a CMS so their own employees could edit their web page contents with an easy WYSIWYG solution. Until that day they needed to call a webdesigner for every change.

However, if you are an Unix programmer, you must try some static content manager. It is far more natural for people like us to edit our posts with vi/emacs/textmate or whatever without even an internet connection. Add your favorite version control system and branch your drafts or other people contributions. Have a copy of your blog replicated in your computers. Filter your posts with grep, spellcheck with aspell, or script massive changes with regular expressions, that is how blogging should be for any programmer. Because no matter how good any of the other dynamic solutions get, your posts will never get the same freedom and workflow quality that you have with your daily tools.

blog comments powered by Disqus