Migrating to GitLab

My personal website has been hosted on GitHub Pages for just shy of three years. In that time, the service has been fantastically reliable and fast. As I slowly added features, the resulting code gradually got larger and fixing breakages became untenable.

I’ve been gradually using GitLab more over GitHub in the past year for my git needs. Access to private repositories as a free user has come in handy, mainly for backing up research data analyses and writing. They too offer a project-hosting solution in the form of GitLab Pages.

GitHub Pages builds sites with Jekyll, so that is what I previously used. The move to GitLab Pages involved adding a Gemfile and a .gitlab-ci.yml to the repository, within which are instructions on what static site generator to use. Once pushed, a pipeline is run according to these instructions to build and serve the site.

A major advantage is that you are able to use other types of static site systems, or specify addons you want to use. After some troubleshooting (there were directory conflicts with a public folder and the way Jekyll built things on GitLab), the site worked, but a few things I had hacked on didn’t end up working well. I’d also been wanting to modernise the website to streamline it and better handle code.

So I made the decision to start again using Hugo as a backend with the Beautiful Hugo template, a port of Beautiful Jekyll by Dean Attali.

Another benefit is SSL. GitHub Pages doesn’t natively support SSL for sites served on custom domains. While end users won’t necessarily notice it, and there are workarounds via Cloudflare, it is regarded as good practice and is well supported by GitLab Pages.

Unfortunately the directory structure is different to how it was previously. While I can import most old posts, the links will not be the same, which has implications for pages used as resources as well as search and commenting.

Edit: Comments appear to be migrating over nicely, and 301 redirects should catch most of the old links.