Jekyll: Writing a Theme, Part I

So, I was transferring about 5 blogs from Drupal to Jekyll. On Drupal, I had chosen a single theme and just varied the base colours and called it a day. With the move, I thought I would have more fun, pick a different theme from somewhere for each blog. Sounds like fun, no? These gem themes are almost drag and drop, right?? Maybe... If you like exactly what you get out of the box...

But let's go back to what's exactly in the box. A Jekyll theme is both the look and feel CSS and the formatting and logic you get from layouts. The big pieces you'll typically get from a theme is the CSS styling, the site navigation framework, and the blog listing. Of course, not every site is a blog, even Jekyll ones, so there are specialized themes like shops, documentation, resume, etc.

For my first site, I picked Hyde which looked simple enough... except the automatically generated site navigation bothered me so I de-gemmed it and mucked around with the site nav such that if you're on that page, the menu option for that page is no longer a link. Also, if the blog is more than one page, the pagination generated pages don't show up in the automatically generated site nav. Tweak this, nudge that, and then I decided to implement what I had decided should be the site's raison d'être, an event calendar, for which I wanted to build in schema.org Event markup, plus calendar and mapping functions.

It was a good start, I got as far as implementing the Event markup and could tell that doing similar for new themes 5 times was madness.

The calendar and mapping stuff, I still intend to implement, but while there is no particular urgency, I did want to kill my Drupal installation sooner rather than after perfecting a bunch of potentially massive projects, so I moved on to the rest of the blogs. Now what? I could continue to modify my mutated Hyde theme for the other blogs. Hyde has a colour selection feature which would make it not all that different from how I styled my Drupal blogs initially, but fussing with that starting point seemed sub-optimal. Now that I had experienced the guts of a theme, I knew that the odds of finding anything suitable to modify were astronomically low (although I did look). There was one theme that already had schema.org markup, and it might have been material, but I'm not sure and in any case, didn't like it. Time to start from scratch and faff around with RDFa and structured data markup!