December 31, 2011

Jekyll Is Also An Island

Posted in Uncategorized at 9:48 pm by dgcombs

Jekyll Years ago I told my brother I’d make a website for him. My sister beat me to it. While I was cleaning out my 2011 todo list I came across the lingering promise. Right below it was another longstanding item the desperately needed cleaning out, Experiment with Jekyll on GitHub. Hmmmm… why not combine the two of them?

GitHub Pages are part of their online web service used to publish web pages for users and their programming projects. The pages can be very complex, composed using Liquid Templating Engine and run through Jekyll which is a “blog aware, static site generator” which converts text files written using a formatting language like Markdown or templating engine like Liquid into a functional website.

I know I’m late to the party on Jekyll. I should have done my todo back in 2010, when I put it on my list. But that’s another story altogether.

More recently (only missed this bus by six months!), OctoPress has been all the rage. OctoPress builds on Jekyll with themes, plugins and a host of other goodies. Both are written in Ruby which is a programming language I’ve tried hard to stay away from. It’s not that I don’t like it, it’s just that I don’t need another programming language. I mean, once you know Perl


Since my sister had already beaten me to the punch, I decided to use a combination of Jekyll, GitHub Pages and Cloud9IDE to create a Fansite for my brother and learn a bit of something in the process. So I created the Totally Paul Fansite.

Problems with Jekyll

I did encounter a few of problems with Jekyll. First of all, the documentation leaves some confusion about when a page vs. a post variable is to be used. When trying to use one or the other in an IF/Else statement, it took some experimenting to figure out which one was right. Then I found that the built-in variables were often less consistent than the ones I supplied. This trial-and-error method led to finding there is no “verbose” mode which would help troubleshoot the problems I encountered. Pages are dynamically created using a combination of layout web pages and Markdown formatted text files and front matter, the variables deposited at the beginning of the text file. The process is very black box, especially to a Perl guy.

Cool things about Jekyll

There are several really cool things that Jekyll does. One was the ability to run an entry through Jekyll, formatting in the process and depositing additional variables into the output which is itself run through another round of formatting. I would say it is recursive, but this might be a bit excessive since I don’t know Ruby and therefore haven’t reviewed the source code.

Biggest Issue

The biggest issue with Jekyll of course, is the function it performs itself. It is a static blog generator. Once it finishes its recursive formatting and replacing and substituting, it deposits the final files in a series directories based on the year, month and day (hence it’s being “blog aware”).

_site

_site/index.html

_site/2011

_site/2011/12

_site/2011/12/31

_site/2011/12/31/2011-12-31-blog_entry.html

But these pages themselves are static web pages. They reload the whole page when you navigate from one page to another.

It might be so 2010, but it’s certainly not 2012!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: