Rebuilding the Website
So long, cohost.Because Cohost is shutting down, I decided to rebuild my whole website so I could use it as a blog. I already have an ActivityPub server, but the software running it (Akkoma) doesn't really work well for long-form posting.
I hadn't been using any sort of site generator for this website -- the whole thing was entirely manual, which involved a lot of copy-and-pasting and would've made something like an RSS feed a Sisyphean effort.
Ideally, I'd have written some sort of bespoke HTTP server in Rust, with on-demand page generation, image processing, and ActivityPub support, but I, unfortunately, have a life outside of yak shaving trivial projects, so, instead, I'm just using Eleventy.
This server runs Nix, though, so I've also set up a relatively simple NixOS module defining a couple systemd services to build the site whenever it detects a change to its source folder. (I'm doing it this way instead of just building it once during Nevermind, I had insomnia last night and I don't want to deal anymore with trying to get Eleventy to work in a systemd unit installed through Nix; it's just building in a derivation for now.nixos-rebuild
so that I can post things without having to go in and rebuild the whole system every time.)
(Make sure not to use Git LFS in a Nix flake repo; it's illegal as of Nix 2.20. This has been causing problems for like 2 hours and I only just now discovered why.)
Eleventy is pretty simple to use, so most of the work here has been in wrangling Nix and NodeJS to cooperate with each other and in dealing with weird CSS edge cases (like the tiny gap underneath images in posts that I can't seem to get rid of).
There are a couple extra things I'd like to get to (like CSS for mobile & a dark theme), but this is good enough for now -- I've been at this long enough that I'm typing ;
instead of .
at the end of my sentences, so I think it's time to work on something else.
Here's the source code, if anyone's interested.