How this site is built
This page is the design doc for the site: what it's made of, the limits it holds itself to, and the options I turned down. The source is public.
Materials
Plain HTML and CSS, generated by Astro from Markdown files in the repository. No JavaScript runs in your browser. The site has 5 direct dependencies: @astrojs/rss, @astrojs/sitemap, astro, satori, sharp.
The type is Source Serif 4, served from this domain in three files: regular, italic and semibold. A page downloads only the ones it uses. The colours are warm plaster, slate and one brick red. The dark theme uses the same materials with the lights off. Every type, colour and spacing decision sits in one file, so a redesign touches that file and no content.
When a page is shared, the preview card is an image drawn at build time from the page's own title, in the same type and colours. It's made once per page, not by a service on each share.
Budgets
I find what is slow or broken in large systems for a living, so a slow personal site would argue against me. Every deploy runs these checks, and a failure stops the deploy.
| Limit | How it's checked |
|---|---|
| Home page under 100 KB transferred | Measured from the built files after every build |
| No request to any other host | The built HTML and CSS are scanned for outside addresses |
| No phone number anywhere | The built pages are scanned for anything shaped like one |
| No copy that goes stale | A lint fails the build on words that pin a sentence to a moment or promise a schedule |
| Lighthouse 95 or higher in every category | Run on every pull request |
| WCAG 2.1 AA, light and dark | axe runs on every page in both themes on every pull request |
The line at the foot of each page reports that page's weight, request count and the build time. It is written after the build from the files themselves, so it can't drift from the truth.
Copy that doesn't go stale
Anything that dates, such as my role, employer and start dates, lives in one data file. Durations like "nearly nine years" are computed when the site is built, so they move on their own.
A post or project is a Markdown file. It stays a draft until I say otherwise, and pushing it publishes it. A post can name the project it's about, and the project's page lists it, so the writing and the work stay connected.
Nothing on the site shows how long it has been since the last post. The home page links to pieces I chose, not the newest ones.
Turned down
| Chose | Over | Because |
|---|---|---|
| Static HTML | A JavaScript framework in the browser | Reading a page shouldn't need a program to run first |
| Fonts served from this domain | A font CDN | A font CDN is a request to someone else's server, and it tells them who is reading |
| Markdown in Git | A CMS | Every change is a diff, and the content moves to another generator in a weekend |
| No analytics | A tracking script | I don't need the numbers enough to make you carry the script |
| Replies by email | Comments | Comments need moderation, and moderation is upkeep |
| DigitalOcean App Platform | GitHub Pages | My other small apps already deploy there, so there is one way to ship |
| Whitespace and a grid | Banners, icons and boxes | Every visible thing should do a job |
What I'd change
- The host tells browsers to keep files for only 10 seconds, fonts included. Each repeat visit re-checks them. The answer is a cheap "not modified", but it's still a round trip I'd remove with a caching rule in front of the host.
- The resume has no PDF download yet. Printing one needs a browser, and the build machine doesn't have one. Your browser's print command gives a clean copy in the meantime.