Migrated to Jekyll!

Well, I did it! Here is the customary Welcome-to-my-Jekyll-blog post, where I try to outline all the steps involved in creating my blog, powered by Jekyll and hosted on Github Pages.

Migrating to Jekyll is possibly one of the best options for a blog. Its primary advantages over Wordpress.com are outlined on this Quora post. Personally, I appreciate the ease at which I can customize this site’s design, compared to other freemium blogging platforms.

Installing Jekyll on Windows

This part here is considered to be rather tricky, since Jekyll is not officially supported on Windows. However, I managed to follow the Official Jekyll Documentation’s tutorial rather smoothly. The only issue I ran into was that Ruby commands aren’t immediately executable after installing it. This guide, which is based on this stack, helped me correctly add the path to my Ruby bin folder to Windows’ environment variables. I managed to install Jekyll soon after.

After installing Jekyll, the tutorial prompts you to run jekyll new_my blog, however I recommend not running this if you plan to select a theme outside of the officially supported themes on Github Pages.

Hosting with Github Pages & Choosing a theme

Theme selection might seem to be a bold jump so early on. But after messing around with the base files after running jekyll new_my blog, I realised that if you plan on using unofficial themes, it’s much easier to fork the theme’s base repository and build your site from there. Using jekyll-remote-theme causes a dependency error for those without cUrl.

Forking is not without its issues though, especially if the repository is outdated, but they are usually limited to common issues that can be quickly solved with a bit of tweaking. Here’s a helpful video explaining how to install a theme by forking, set it up with Github Pages, and lastly solve those common issues.

For my theme recommendations, I would advocate Poole, Lanyon or Hyde for blogs. Since they are somewhat popular themes, there are quite a few resources out there to help with customizations. If you can’t be bothered with customizing, then feel free to utilize some of the more elaborate themes easily found through a Google Search.

Github Pages is quite a common platform for hosting Jekyll sites, as it is free, and comes with its own repository for content management. However, there are several issues that can be encountered with it. Firstly, Github Pages uses a subdirectory URL structure that might interfere with running with http://localhost:4000 when your code references ``. You will need to tweak the code using this format: Project Page URL structure. Else, you can use multiple configuration files. Set up a seperate _config-dev.yml and run the following whenever you build locally.

jekyll serve -w --config _config-dev.yml

Also, Google Analytics docks Github Pages for not leveraging browser caching. Github Pages sets cache-control: max-age to 10 minutes in the header, and there is no way to change that as of now, unless you use your own CDN such as Cloudflare. There is, however, a workaround that requires you to download the analytics script and host it locally.

Customization Options

Technically there is no end to customization, but there are certain common ones used by many Jekyll blogs. Here are some resources that I used. Some of these are from blogs that also utilise Jekyll and the Poole family of themes.

Post Excerpts

For when your main pages is loaded with content and you wish to condense the posts into bite-size previews.

Tags

A typical blog feature not usually supported with Github Pages.

Brightens up the main page! Quite a popular Wordpress.com feature.

Poole/Lanyon/Hyde specific: Patrick’s outline & Kyle’s walkthrough of it

General customization guides for creating elegant blogs.