What a minimal personal site needs
The few files a personal site actually needs, what I left out on purpose, and the one place where I spent weight on purpose.
This site is a handful of files. There is no framework, no bundler for the home page and no backend. I want to say what a personal site needs, and what I decided not to add.
The list
A personal site has one job: tell a visitor who you are and where to find your work. These parts do that job.
- One HTML file with real structure: a heading, sections, links and text that you can read without any script.
- One stylesheet.
- A page title, a description and a viewport tag, so search results and phones behave.
- A way to serve the files over HTTPS on your own domain.
That is the whole list. Everything else has to earn its place.
What the home page weighs
I measured the home page files, uncompressed.
| File | Bytes |
|---|---|
| index.html | 11627 |
| styles.css | 10186 |
| main.js | 5190 |
| anime.iife.min.js | 76462 |
Together that is 103465 bytes, about 103 KB. Three quarters of it is one vendored animation library. The page also makes one request to a font host. I have no analytics, no tracking script and no tag manager.
Where I spent the weight
The animation library drives the diagram in the hero. The diagram shows traffic routing around a failing node, which is the work I do. A sentence says it, and the diagram shows it. I kept the library because the diagram backs up the claim.
The rule I use is simple. If I cannot say what a file does for the visitor, it goes.
Script is optional
The page works with JavaScript turned off. The script only adds the animation. If the browser reports that the visitor prefers reduced motion, the diagram stays still. The content does not depend on any of it.
This matters more than it sounds. A site that needs script to show text breaks on slow networks, in feed readers and in search previews. A site that treats script as an extra does not.
No build step, with one exception
The home page has no build step. I edit the HTML and CSS, and what I wrote is what the server sends.
The blog is the exception. Posts are markdown files, and a small Bun script turns them into static HTML pages, an index and a feed. The output is plain files again. I accepted one script there because writing HTML by hand for every post is the kind of chore that stops people from writing.
Vendor your dependencies
I copied the animation library into the repository instead of loading it from a CDN. The page then depends on my server and nothing else, apart from the font. A CDN outage or a changed file cannot break the page. The cost is that I update the library by hand, and for a file that rarely changes that cost is small.
Serving it
The site runs on Cloudflare Workers as static assets. The config names the folder to serve and the domains to answer on.
name = "my-site"
compatibility_date = "2024-01-01"
[assets]
directory = "public"
There is no Worker code in it. The platform serves the files from the folder. A deploy is one command, and the site has no server for me to patch.
What I left out
I left out a comment system, a newsletter form, a cookie banner, a dark mode toggle script and a search box. Some of those are fine on a bigger site. On this one each would add code, and I would have to maintain it.
If you start a personal site, begin with the list at the top. Add something only when you can name the visitor who needs it. A small site that loads at once and reads well on any device does the job better than a large one.