I’m switching my blog over to a new hugo theme. It looks slightly nicer now, but migrations are hard and there will be some broken posts.

Background

When I was at Mozilla back in pre-2014 years I blogged on their corp wordpress setup. It was awful. I hated the WP editor, I hated the WP themes, I hated the WP plugins.

I had cool blog posts on there, but they were all deleted when I left. I managed to get a backup, but never found the energy to restore it. The posts are on tech which is long obsolete, so the motivation is decreasing with time. I did spent the time to rewrite the coolest blog post I had on there on tracing how page faults work while taking the time to switch from SystemTap to Ebpf.

Hugo

After moz I switched to jekyll. This was better, but Ruby is soo slow.

Then I moved to hugo and been fairly happy. It’s really cool to have all my posts in markdown, the blog as static html (so it doesn’t randomly change due to someone upgrading my blogging engine or due to database errors). It’s also cool to have it hosted on a geo-distributed CDN for free.

However, hugo themes all have major tradeoffs between them.

I started with beautifulhugo which had limited syntax-highlighting support and no search.

Then I switched to LoveIt which had search, mermaid diagrams, syntax highlighting a lot of other fancy features. Unfortunately it had some fairly unpleasant color choices in syntax highlighting and made me sad to look on my blog. I went to customize the colors only to realize that it was written by some hipster UI developer and used some css compiler/bundler/whatever that I would have to deeply understand to change the colors. I gave up.

I am stone-age web developer who has trouble with any abstractions on top of DOM and CSS. I gave up and felt awful about how my blog looked.

PaperMod

Today I switched my blog over to PaperMod.

It has search support which I frequently use to look-up my old posts. It’s hilarious at how naive the search implementation is. It just dumps every blog post into json and does a string search. I really appreciate devs who triple-down on simplicity over scalability.

I also really like how readable the default colors are. And it doesn’t use a crazy css compiler/bundler/whatever. Unfortunately, it will take some tweaking to get back mermaid support.

To set syntax highlighting colors in PaperMod:

# run the following in hugo root
hugo gen chromastyles --style=abap > assets/css/extended/hugo.gen.chromastyles.css # # https://gohugo.io/content-management/syntax-highlighting/#generate-syntax-highlighter-css
mkdir -p assets/css/extended/ # css overrides go in here
# override the right element
cat <<EOF >> assets/css/extended/override.css
.post-content pre code {
  --code-block-bg: white;
  border: 1px solid;
  color: black;
}
EOF

Conclusion

Migrations like this always come with downside of old posts mis-rendering and being broken. Sorry about that. I hope to fix them over time.

For now, hooray for being free of weird web tooling, hooray for PaperMod!