Things have changes around here!
About a week ago I had some thoughts I wanted to capture and publish to my blog, but I decided against it because the simple step of recompiling 11ty and rsync was more than I wanted to do. I'm lazy, I know. Then I got to thinking, what if I had a web server that ran completely off markdown files, no other steps involved? And well, here we are!
This latest iteration of my blog is built in Rust and runs off nothing but .md files and a single style.css. The server doesn't have to be built or restarted, I just add folders and markdown documents.
How it works
The server looks at a /www directory and handles routing based on these rules:
- A request to a
.mdfile or a named route (ie/posts/article-1) causes the server to check for a markdown file, render to HTML and return the result. - The server checks the directory of the file for a
style.cssfile and applies it. If one does not exist, it works up the ladder of parent directories until it finds one, or ignores if it can't find one. - Requests to directories or index files or handled either by a
index.mdfile, or a generated directory list HTML file ifindex.mddoes not exist. - Every directory without a
index.mdfile automatically responds tofeed.xmlandrss.xmlwith generated feeds of the children in that directory. - Requests for images, CSS and JavaScript are passed through.
- The server runs via Docker, uses Caddy in front of the Rust server and sits on a DigitalOcean VPS.
The result
This is the server setup I've dreamed of. Literally as simple as can be, 0 friction to write while still allowing the freedom to customize styles. I'll probably add more features over the next couple of days, but I'm already very happy with the result.
Now for the elephant in the room
I used Claude Code to help me build this. Sorry. Like I said I've been dreaming of this setup for awhile, and I wanted something that let me focus even more on writing, but I simply would not have had the time to write this server alone. Between 2 kids (one being 3 months old) and a high-stress startup job, leveraging Claude was my only way to build this. If that's a deal killer, I totally understand. If not, you can check out the repository on Github.
My feelings on LLMs have been a roller coaster that past couple of months, and to be honest I've almost been a bit ashamed of my slow acceptance of the technology. I'll write on this, and I'm sure it'll lose me some followers (well actually, me changing my RSS URL probably lost most of my followers :-/).
As always, feel free to shoot me an email at hi@thatalexguy.dev.