um9i.dev
This website: a small static-site generator in Rust, served by Caddy, with no JavaScript, cookies or trackers.
- Status
- Active
- Built with
- Rust, pulldown-cmark, askama, Caddy, Fedora
- Started
- Live
- um9i.dev/
Why build it
A company website is a sample of the work. This one is held to the standards we’d apply for a client: fully rendered pages that work without JavaScript, accessible to WCAG 2.2 AA, fast on a weak connection, and deployed in a way that checks itself and can be undone.
How it works
A small Rust program reads Markdown files and writes plain HTML. Caddy serves the files. There is no application server, no database and nothing to patch apart from the operating system and Caddy itself.
- Four dependencies. pulldown-cmark for Markdown, askama for templates checked when the code compiles, and serde and toml for the settings. The feed, sitemap, dates and link checker are a few dozen lines each.
- Mistakes stop the build. A typo in a tag, a missing summary, a heading out of order, an image without alt text, a broken link or a missing anchor is an error, listed with the file it’s in.
- Every old address keeps working. Redirects live next to the content they point at, and a script asks a local Caddy for every old URL before anything is deployed.
- No cookies, trackers or third-party requests. The content security policy forbids them, so a mistake can’t add one.
Deploying
A deploy builds from a clean copy of the committed code, runs every check, and uploads the result as a new release next to the current one. The server tries the new release on a private port first. Only then does a single atomic rename make it live. If the live site doesn’t answer correctly, the previous release goes back.