Adam Millerchip

– An Englishman in Japan.

Tech musings, armchair economics, personal finance, etc.

Hello, World!

Published: 2025-04-24 11:30 JST
Tags: tech

Finally. It’s done.

This site is the culmination of a long-held but forever (until now) procrastinated ambition to create my own website. It’s not the first personal website I’ve had. I did have a Geocities site back in the early 2000s, which I can’t remember at all and which is probably lost to the depths of time. There is also my old Tumblr blog. But this is the first website of my own that I’ve created. It is the first site that is fully my own, built from carefully laid HTML tags and CSS classes, running on my own server with my own software, not on anybody else’s platform.

I have some free time this year, due to leaving my job at the end of 2024 and deciding to take some down-time. After a few months of recovery from the stress of working at startups for 5 years, I made it my objective for April to build my own blog, and this is the result.

I went through many false-starts over the years, where I constantly changed the approach I was going to take. I was going to use a static site generator. I was going to keep it completely manual with just static HTML and CSS pages and no Javascript. I was going to use Ghost. I was going to use Kirby. I worked on MVPs for all of these solutions. Eventually I settled on a custom engine built with what has been my go-to language of choice for almost a decade, Elixir.

The website itself is using Elixir’s Phoenix Framework, although perhaps rarely for a Phoenix project it does not (yet) use a database. I was planning on writing vanilla CSS, but since Phoenix comes with Tailwind, I decided to give it a try. For the blog posts themselves (of which this is the first), I write them in markdown and use Nimble Publisher to convert them into HTML at compile-time. When you open a post, the HTML is served from memory, not a file. I implemented ETag generation based on hashing the post contents, so caching should work. I also implemented pagination and tagging for the posts; I initially thought about leaving these until there are actually more posts to organise, but I wanted to take the chance to do it now, as it was pretty fun, and I may not have as much free time to work on this in the near future.

I also implemented an RSS (well, Atom) feed as a must-have, made easy thanks to the Atomex library. While it would be technically possible to dynamically generate the feed for every request, as the feed does not change unless I write a new post, and that requires a re-compile, I implemented a compile-time Mix task that regenerates the feed, which is called when deploying the app.

Server-side, the application is containerised, and I run it using nginx-proxy, and the acme-companion, which handles acquiring a TLS certificate and keeping it up to date, while allowing me to also run other public-facing containerised services on the same server.

There are two big features that I want to implement that are out of scope for this initial version, and they’re both related. One is comments. I’d either need to use a 3rd party system, which I don’t want to do, or introduce a database for that. The other is implementing ActivityPub so that the posts will appear on the Fediverse. If the blog becomes a first-class Fediverse citizen, I also thought it would be great if Fediverse replies to the post would show up as comments when visiting the site. If I did this, I wouldn’t strictly need a database to show comments, but I would need a way to at least moderate what content appears on the site. Additionally, since most people are not using Mastodon or similar, I was thinking of taking the best of both options, by allowing people to comment on-site by verifying their e-mail address, which would also create them a Fediverse “account” on this instance and be visible from other instances, at the same time as displaying comments made by accounts from other instances. But as I said, out of scope for now.

Hopefully this is the beginning of a new era of blogging for me, and not the first and last post. As comments are not implemented, any comments are welcome on Mastodon, where I will manually share this for the time being.