Just moved my blog to GitLab. It allows me the same git-based workflow as I enjoyed with GitHub Pages, but it also lets me use SSL with my custom domain.
I found these pages useful:
Since I’m using NixOS, the TLS instructions on GitLab didn’t work. I was able to
install the Certbot package in the main Nix channels
certbot in the GitLab documentation.
I also had to make a minor change to the
.gitlab-ci.yml example in the GitLab
documentation in order to make it copy the LetsEncrypt challenge directory to
the public GitLab Pages directory. The entirety of my file as of this writing is
- mkdir .public
- cp -r * .public
- cp -r .well-known .public
- mv .public public
Since GitLab doesn’t automatically add the
.html extension to missing pages,
as GitHub does, I also wrote a small bash script to softlink all my HTML files
to their original names minus the extension. As of this writing:
for d in $(find $dir -type d)
for f in $(ls *.html 2> /dev/null)
if [ ! -f "$ln_f" ]; then
ln -s "$f" "$ln_f"
The entirety of my blog’s source code can be found at https://gitlab.com/ryepdx/ryepdx.gitlab.io and https://gitlab.com/ryepdx/ryepdx.gitlab.io-markdown.