otaku-elite meets jekyll

After not having the desire to post content to this site for a very long time I decided it was time to take action. But how? And what was the problem in the first place?

##The Problem I needed a way to log (blog?) my discoveries for all of the things I do, but mostly work related stuff, since that’s where I spend most of my time (har har). Even though being a PHP programmer may seem like a pretty normal thing in that over time you sort of learn the ropes and acquire your sack of tricks to reuse over and over I’ve found myself always craving for something a little extra. I always push myself to find something new and interesting at work that can help me get my work done better and more effectively than before. Let’s face it, if I always did everything the same way I’d just get bored all the time.

What I really needed was an efficient way to log my findings. I tried setting up a drupal blog at work. It took me quite some time to get all the settings configured right and all the right plugins installed. Then to customize the themes and all of that and then you have to deal with caching and whatever else. After I took the time to go through all of that I realized more and more how inconvenient it was for me to add content to the blog itself—nothing against drupal itself, as I would always recommend drupal to most people—but the part about drupal I did not like was having to log into an admin section on the site and have to click around in a few places, then write the post using HTML in a text field provided by the CMS. I’m also not a fan of using wysiwyg anything, either.

As a temporary solution I was using the it’s all text extension for firefox, which helps when I have to do anything with drupal in that it allows me to use my favorite editor (vim). The down side to this is that it also added another step. And after saving the buffer in vim I still had to click the save button in drupal, and since there is no “save & continue editing” button by default in drupal it became a nuisance in that testing slight changes repeatedly became a cumbersome task.

After switching to git and using github for a while I became very comfortable with writing documentation using markdown, and I decided to forget the whole blog as a website thing all together and just store a bunch of markdown text files on my hard drive which were generated for me by a shell script that I wrote. The shell script accepts an article title as an argument and automatically generates a markdown file in an organized directory structure that resembles something like Y-m/d/post-title.md. I created another bash script which would execute a grep on the directory as well so the articles were all searchable. This worked fairly well for me for some time as it allowed me to just open up a terminal and type, for example, createblog creating modules in magento and just start typing away. I always thought that if I wanted to publish it or read it nicely later on I could create some other script to generate PDFs or HTML and link them together.

##The Solution Then I found out about jekyll. Jekyll is not a CMS, but rather a text parsing engine which works similar to what I was just explaining, except all of the complicated advanced features that I would ever think to implement myself were already done for me (tagging and categorizing, just to name a few). So in short, jekyll will take markdown or textile as input and throw a template on over it to generate some nice HTML.

##Jekyll Bootstrap The initial setup for jekyll was a pain in the butt. Especially since it comes with absolutely no templates or framework and the documentation is a bit hairy since it doesn’t say too much right out and the github pages are a little bit tricky to navigate since they seem to have absolutely no ordering to them at all. After searching around some more for information on jekyll (which for some reason appears to be rather scarce) I came across jekyll bootstrap which is a framework geared for getting you started out on jekyll using twitter’s own bootstrap css framework. Which got me to where I am now, a decent looking site using jekyll which provided the least amount of effort possible and now I can focus on my content :)

There will probably be more (concise) blog posts to come that focus in on hot topics that the rest of the world may actually care about.

blog comments powered by Disqus