Site Architecture

Breaking: Local man builds lo-fi blog and congratulates self

How and why I chose Hugo and Cloudflare to build this site.

Pre-requisites

Of course there are a million ways to start a blog, but I want complete control of the code and portability in case I change my mind later.

Language

Jekyll was the natural choice since I’ve been writing in Ruby for years, but I’m intentionally resisting that. Nothing in particular against Ruby, but it was kind of foisted upon me by a previous employer and I’ve somehow found myself mid-way through a career that’s starting to look an awful lot like a Ruby specialist. As fate would have it, the Ruby community has been good to me so it’s become my primary backend language, even though I generally prefer TypeScript. No complaints, but sometimes the path chooses you.

Seeing an opportunity to branch out, and having already worked with a bunch of other languages (Python, PHP, Java, C++, C#, you name it) I figured I should give Rust or Go a spin. Not that spinning up a readymade static site framework is much of an opportunity to get my hands dirty in a new language, but y’know, baby steps.

Allegedly Go is slightly more akin to Ruby and Rust has a steeper learning curve. I hear mention of Go being an in-demand skill for software engineers, so that settles it.

Domain and hosting

I nabbed the .dev domain because the short url I liked was available and suits the intended purpose of an engineering blog. aistein took a while to settle on but struck the right balance of professionalism and brevity. (My initials just happen to be A.I. and have nothing to do with artificial intelligence, though I’m sure I’ll write plenty about that).

Cloudflare made the domain registration a no-brainer, with reasonable pricing and a generous free tier for personal hosting. Their global CDN infrastructure is also a bonus, not that scaling will be an issue.

The other option was GitHub Pages, which would no doubt do the trick but since I’ve done it before and it’s old hat, I’ll try something new instead.

Framework

Hugo emerged as a front-runner since it’s built in Golang and compiles to single binary, promising lightning performance. It also happens that Cloudflare has some pretty sweet docs, and supports Hugo deployment with minimal setup.

The runner-up was Zola (Rust-based), which also has great Cloudflare support, but a brief assessment revealed thinner documentation, fewer GitHub stars, and less frequent releases.

Hugo is easy-peasy to install on MacOS via brew install hugo and the local server hugo serve makes local dev previews simple.

I fell into a classic trap of procrastinating over themes for a while, trying out a few minimalist Hugo themes before deciding that I’d prefer a completely custom theme stripped of almost all styles and bloat. This was easily achieved with my good friend Claude, although I ended up stripping out a few of its overly helpful style defaults.

Deployment

With a bare bones GitHub repo under my belt, I was incredibly impressed with the speed at which Cloudflare Pages deploys the latest pushed commit. It’s literally deployed within a few seconds. I’ve been working in bloated Rails, React, and Buildkite deployments for so long I forgot how simple and fast things can be when you are compiling and building and deploying assets etc. Granted this is literally just rendering text and hyperlinks, but still - what more do I need to transmit sleep-inducing technical articles across the Internet? After all, it’s just another motherfucking website.

Yay

My dream of deploying a bare-bones, minimum markdown blog was surprisingly easy, and I suppose that shouldn’t be a surprise since I’m a professional software engineer and I intentionally kept it lo-fi. Still, there’s something refreshing about just building something simple after working on incredibly complex app architectures for the last twenty years. The framework itself is complete enough that I learned absolutely nothing about Golang, but I’m sure I’ll find something else to hack.