How this site is built

A theme I wrote myself, almost no third-party requests, and how the content, the CV and the live GitHub figures fit together.

A chain of five boxes: Markdown files in content, the back end, a theme written for the site (highlighted), Cloudflare, and the visitor’s browser. Below it, a note that almost everything comes from this domain, the two exceptions being Cloudflare’s spam check and visit counter. A chain of five boxes: Markdown files in content, the back end, a theme written for the site (highlighted), Cloudflare, and the visitor’s browser. Below it, a note that almost everything comes from this domain, the two exceptions being Cloudflare’s spam check and visit counter.

I built this site with a theme of my own, without a page builder, a front-end framework or tracking. What a page needs comes from this domain, with two exceptions, both served by Cloudflare: the contact form’s spam check and the script that counts visits.

Content

Each page, post, project and job is a content item with typed fields: a project has a kind, a status, a licence, the year it started, the technology it uses and its links. The CV is built from the job entries and a vocabulary of skills, which keeps the page, the printed CV and the JSON Resume version in agreement.

The content is written as Markdown files with front matter. An import command creates or updates each item by its path: one command rebuilds the site from an empty database, and running it twice changes nothing.

If you spot a mistake anywhere on the site, please tell me through the contact form.

Live figures from GitHub

The project pages show each repository’s latest release, last change and stars, and the home page lists the projects I’ve changed most recently. A scheduled job fetches them from the GitHub API four times a day and keeps them in the database. Pages don’t wait on GitHub, your browser never talks to it, and if GitHub is down the last good figures stay.

Type and colour

I chose Schibsted Grotesk, drawn for a Scandinavian news publisher, for headings, dates, facts and controls, and Libre Caslon, a revival of the English printing face of almanacs and newspapers, for the reading text. Both are self-hosted under the SIL Open Font License, so there are no requests to a font service.

The light theme is warm paper with near-black ink; the dark theme is near-black with cream ink. One vermilion accent marks the things to look at. The site follows your system’s setting unless you pick one in the footer, and remembers the choice in your browser.

Libre Caslon Display

The name and page titles

Libre Caslon Text

Everything you read

Schibsted Grotesk

Dates, facts and controls

  • Page --page
  • Ink --ink
  • Muted text --muted
  • Rules --rule
  • Links --link
  • Accent --accent
The two faces, and the colours of the theme you're reading in. Switch between light and dark in the footer to see the other.

Security and privacy

The server sends a strict Content-Security-Policy that allows scripts, styles, fonts and images from this domain alone. The one inline script, which sets the light or dark theme before the page draws, is allowed by its hash. The exceptions are Cloudflare’s: Turnstile, the contact form’s spam check, whose script and frame come from Cloudflare, and the Web Analytics script that counts visits. Pages are served over HTTPS with HSTS.

The contact form is the one place that takes personal data. Turnstile tells people from bots, usually without asking you to do anything, and a hidden field catches simpler bots. Messages are emailed to me rather than kept on the site. The privacy notice lists the short-lived anti-spam records the site does keep.

Accessibility and testing

Each template is checked with axe against WCAG 2.2 AA in both themes, on a desktop and a phone. The layout works from a 320px screen up with no sideways scrolling, the controls work from the keyboard, and the one animation, a mark moving along the rule on your first page, is skipped if you’ve asked your system for reduced motion. The CV prints on A4 and can be downloaded as a PDF.

Featured projects

All projects

Latest writing

All writing