In the past I struggled with finding a decent blogging platform. WordPress was the obvious go to option but it always seemed way too heavy for what I was trying to accomplish. WordPress offers two options for getting your blog up and running: hosting your site on WordPress servers via; or self-hosting using the open source I played around with both options around a year ago and was never really satisfied with either. The former seemed too locked down and limited in options; the latter reached the opposite end of the spectrum with an abundance of settings and plugins to tweak. I often found myself logging in to WordPress with the intention of writing content only to find myself instead spending an hour playing around with layouts and themes, updating plugins, et cetera. Self-hosting also meant having to worry about security updates for all of the bits and bobs powering the backend such as the nginx web server, MariaDB mySQL database, and more. I also worried about the security implications of having my Rasbperry Pi exposed to the world wide web which led to hours of playing with iptables, fail2ban, and the like. The interface always felt “clunky” and was slow to generate changes, even when accessing content via the local network. By the time I finished updating everything I would typically call it a night and give up on posting actual blog content.

How I Learned To Stop Worrying and Love The Blog

Around the start of 2021 I discovered a renewed interest in blogging, and instead of jumping back into using Wordpress I decided to explore my options. I quickly learned that static site generators were all of the rage, and my initial impressions were that they sounded much more up my alley: light, minimalistic, and fast without a tonne of settings to tweak or an abundance of plugins to concern myself with. I did a bit of research into the available options and settled on Jekyll as it seemed to offer what I was looking for. Simple? Static? Blog-aware? Sign me up!

My initial impressions turned out to be correct as it took me less than a few hours to build a site and start posting content. Pages are written in Markdown which uses a very straightforward syntax and customized via simple CSS stylesheets. The site can be previewed locally by running:

bundle exec jekyll serve

and then connecting to localhost via port 4000. Jekyll is able to generate this entire site in 0.393 seconds since it is only using roughly 650KB! Once you are satisfied with the results, changes can then be pushed to the live site via Git.

This site was initially hosted on GitHub Pages since it was the most simple, widely documented, and straightforward option. Before long I started to explore other options, mainly due to Microsoft’s acquisition of the site in 2018 which raised many concerns about the integrity of the platform and its long-term viability as an free, open source solution but that is beyond the scope of this article.

I had heard many discussions in which GitLab was brought up as a more secure, privacy respecting alternative to GitHub so I made the decision to migrate this site to GitLab Pages. GitLab is a little less well documented than GitHub so it took a bit more time to get things configured the way I intended but it was well worth making the transition. It took me a few hours to migrate everything and stumble over a few hurdles which were mainly caused by the slightly spotty documentation mentioned above and the fact that GitLab seems to be more geared towards Enterprise users than someone hosting a tiny blog like myself. After figuring out how to generate a proper gitlab-ci.yml template file, how to push changes directly to the Master branch instead of having to approve them via Merge Requests (redundant because we can already preview changes by building the site locally) and a few more niggles things were up and running smoothly.

The fact that this site was written in Markdown and built via Jekyll made the transition much more straightforward than migrating to / from something like WordPress which uses pages written in PHP and content stored in a mySQL database for site generation.