Jekyll Logo

A year ago today I moved this site over to Jekyll and I wanted to share some of the things I’ve learned and discuss how the process has gone.

For more information see my past posts on this process:

Thing’s I Like

Performance

Because the site is just a bunch of HTML documents on the server, access is really fast. This is the key reason I switched and I’m glad to see how fast it is in practice. Even syncing the whole site doesn’t take more than a couple seconds with rsync.

Markdown

A great feature of Jekyll is that it support Markdown out of the box. This has become my preferred method of writing posts because it allows me to open Sublime Text and start typing whatever I’m thinking without having to worry about an Internet connection. I was actually using this as my process when I was using Wordpress but having it in one place really helps with my work flow.

Git Versioning

Because the whole site structure is text based, I’m able to easily use Git to keep track of my posts and back them up to Bitbucket with almost no effort (as someone who uses Git every work day it’s no effort).

Thing’s I Don’t Like

Performance

When Jekyll runs it regenerates every file on the site. With a small number of posts/pages this regeneration is very quick but it takes more and more time as the number of posts grows to the point that it now takes ~6 seconds to regenerate this site:

  Server running... press ctrl-c to stop.
      Regenerating: 1 file(s) changed at 2017-01-03 20:00:40 ...done in 6.055882 seconds.
      Regenerating: 1 file(s) changed at 2017-01-03 20:00:56 ...done in 6.120511 seconds.

I discussed a way to Speed Up Site Generation in Jekyll last year but the total amount of time continues to creep up (it’s up to 2 seconds now) and I’m not 100% sure why. 2 seconds doesn’t seem like a long time but when I’m working on the final draft of a post I tend to save and check repeatedly so spending time waiting for the “…done in x seconds” message to display adds up. It’s also difficult to link to old posts when I’m in ‘devel’ mode because they’re not all in the generated site.

Hard to Schedule Posts

Because Jekyll is a static site generator, scheduling posts work but you have to manually run the process to have it posted. I could write a script to regenerate the site every hour but my hope was to have all the “smarts” on my local computer so I’m sure what I have on my laptop is what will be generated on the site.

Images are (more of) a pain

Wordpress provides an easy to use method for uploading images and inserting them into posts. The Jekyll process involves copying them to the assets directory and then manually entering the path to the file. I was able to resolve some of this by creating a Sublime Text Snippet but it’s still a little annoying. I’ve also had spend some time working out a good organization scheme so I don’t have hundreds of images in one directory (year then post name works well so far).

Metadata

Because there isn’t database backend for the site, Jekyll uses metadata at the top of the page that looks like this:

---
layout: post
title: Lessons Learned From A Year With Jekyll
date: 2017-02-10 20:11:00.000000000 -05:00
type: post
published: true
status: publish
categories:
- News
tags: [Jekyll, news, posts]
author: warren5236
---

I’ve found it almost impossible to remember all the options, so I usually just copy and paste the information from a similar article. The nice part about this is that it’s part of the text file so changes can exists within a Git branch.

I’ve run into problems with using relative links (the best kinds of links) in posts because when the post gets served via RSS Jekyll doesn’t try to replace the relative link with an absolute one. To fix this I’ve had to add “{{ site.url }}” to any of the relative links. It’s not a huge problem but it is an annoyance.

Overall

Overall, I’m very happy with my switch to Jekyll. My couple of minor annoyances are more than made up for by the speed and the Markdown and Git support.

That being said I would not set this up for a client or a non-technical family member. I just set up a blog for my partner and I used Wordpress because I know she wouldn’t want to jump through the hoops I’m willing to. :-)

Like this post? Don't forget to follow us on Twitter and Facebook for updates.