After posting about ScalaJS and browser testing, I realized that getting feedback on the code snippets would be useful. There was no way to obviously contact me on the blog, other than a Twitter message. Anyone looking at the post wouldn’t be able to see the responses easily. This problem must have been solved before. Comments!
After doing some googling, Disqus seemed like a reasonable option. The criticisms on Wikipedia are a bit scary from a privacy point of view, but it definitely was the easiest option. Of course, I’m going to be tied to vendor this way. Vendor lock-in is so easy when the user isn’t interested in putting more work into an alternative. We’ll see if that bytes me eventually.
While googling about Jekyll + GitHub Pages + Comments, I stumbled upon minimal-mistakes, which is a Jekyll template with built in Disqus commenting. I could spend a few minutes following the official Disqus instructions to add comments to the existing blog, or I could spend an hour changing the blog’s look. Guess what I picked.
Switching over to use the new style took a bit of effort. The steps I took were:
- Clone the old blog’s repo.
- Add the minimal-mistakes repo as another origin.
- Create a new branch based on minimal-mistakes’s
- Make sure I can run the blog locally. See below for some problems I hit.
- Modify the config with my info.
- Get rid of the default navigation links in
_data/navigation.yml. They were pointing to minimal-mistakes’s docs.
git cherry-pickall of the post commits from the old blog.
- Go through some migration problems. See below.
- Delete the old
- Cut a new
masterbranch based on the new blog post.
- Force push to GitHub. Force pushes are a bit scary, but if you want to rewrite history, it’s the only way. If you cloned this blog’s repo before and the force push destroyed your local checkout, sorry. If you had cloned this repo though, I’m curious on why. Let me know in the comments!
Docker. I had some trouble using the docker command for Jekyll from the first post. After some frustration, I realized that the minimal-mistakes is using a Gemfile. The Jekyll docker image had its own set of gems. I had to change the docker command to:
docker run --rm --label=jekyll --volume=(pwd):/srv/jekyll -it -p 192.168.99.100:4000:4000 -e POLLING=true jekyll/jekyll:pages bundle exec jekyll serve
The layouts were different. The old Jekyll blog used the
postlayout, while minimal-mistakes uses
single. Needed to update the posts to use the new layout. The minimal-mistakes docs mentioned using Front Matter defaults, so I just got rid of the
layoutsetting in every post and specified it in the defaults.
Permalinks. The old blog used the
datepermalink style, while minimal-mistakes had another. In order to keep the old links working, I changed it back to
Slower. It feels like Jekyll is a bit slower to auto-regenerate blog posts on change. Haven’t timed it, but it seems noticeable. Annoying, but I’ll put up with it.