Lessons Learned From A Year With Jekyll
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:
- Moving From Wordpress To Jekyll - Part 1
- Moving From Wordpress To Jekyll - Discus
- Moving From Wordpress To Jekyll - Data Cleanup
- Moving From Wordpress To Jekyll - Sitrep/annoyance
- Moved To Jekyll
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:
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:
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.
Relative Links
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. :-)
Scott Keck-Warren
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around the house with his loving partner.
Top Posts
- Working With Soft Deletes in Laravel (By Example)
- Fixing CMake was unable to find a build program corresponding to "Unix Makefiles"
- Upgrading to Laravel 8.x
- Get The Count of the Number of Users in an AD Group
- Multiple Vagrant VMs in One Vagrantfile
- Fixing the "this is larger than GitHub's recommended maximum file size of 50.00 MB" error
- Changing the Directory Vagrant Stores the VMs In
- Accepting Android SDK Licenses From The OSX Command Line
- Fixing the 'Target class [config] does not exist' Error
- Using Rectangle to Manage MacOS Windows