How This Blog Works


Time for the obligatory “how this blog works” post. I started by cyber bullying a robot into creating a static site that I could deploy to S3. It picked Astro, a static site generator I’d never heard of before. What do I care; the robot’s the one who has to maintain it. As a nice bonus, the RSS feed came along without needing to be hunted down.

One of three remarkably pleasant things about building via robot bullying is that I can show the thing a screenshot of how the site looks at any given point, then prompt it with a “make it better” or “make it pop.” I don’t have to describe exactly what I want past “make it less shitty,” which is something human designers love to mock me for. No judgement, just a visually pleasing result that I don’t have to think about too much. That’s no small thing—and I can tinker with the layout all I want, because the content renders regardless.

Next, I made the robot add a GitHub Action to auto-build and deploy it on every commit. Since I believe in not checking my work, I end up doing a lot of deploys along the way. That gets expensive once you’re out of GitHub Actions’ free tier. To that end, I run self hosted runners in my home Kubernete, which (since it’s a Raspberry Pi cluster) takes a bit of time (up to 5 minutes), but what do I care? It took a bit of tweaking to ensure that the timestamp of a post is properly derived from the git commit. It shoves the static assets to an S3 bucket, then clears Cloudflare’s cache.

On that same Kubernete, I’m running a privacy-respecting analytics suite (I don’t need to stalk you) that doesn’t appear to be working right, and in fact I may replace with an old-school page counter. A future project for the backlog.

Now we’re going to actual content creation. I use the Drafts app to write my posts. I have a draft action that automatically populates an empty note with the frontmatter that controls the title, description, etc. Depending upon whether I trigger it on iOS or macOS, it’ll follow different workflows to commit the file with an autogenerated title, and push it to GitHub.

At the moment I haven’t had to muck with other things: live-blogging, images, webpub to tickle rss readers, etc. They’re nice to have, but at the moment I don’t need them. I’m not even sure how I’d get Drafts to play nicely with inline images.

That’s the meat of it, and it took maybe an hour to get all of this done in between other tasks. And now I can write posts like this on my phone, while on the train, and then fire off the publish action: like so.