About

Side Effects is a personal blog where I try out design ideas, and a place for posts I think are worth reading. It runs on Hugo, with a custom theme mostly inspired by Tony Zorman’s site. The theme is the interesting part, so most of this page is about how the site is built.

Features

  • Build-time content pipeline — pandoc renders every post at build time: footnotes and inline notes become Tufte-style margin sidenotes, math is pre-rendered with KaTeX, and Mermaid fences come out as inline SVG

  • Typeset for both scripts — Latin in Hanken Grotesk (body), Inter (headings) and Source Code Pro (code), served from Google’s China-accessible font endpoints; Simplified Chinese in a self-hosted Noto Sans SC subset, regenerated from this site’s own text on every build

  • Light and dark — one light-dark() token set follows the system preference; every colour pair in both themes is checked by a WCAG contrast audit that runs over the composited values

  • Reading aids — a table of contents built from the page’s headings (a scroll-spy bar at the bottom on mobile, with back-to-top), image lightbox, and code-copy buttons

  • Margin notes that align themselves — sidenotes float beside the text in pure CSS; a small script fine-tunes their vertical alignment on wide screens

  • Syntax highlighting — pandoc’s built-in highlighter with a custom Alabaster-inspired palette, shipped in both themes

  • Fast and small — AVIF images with intrinsic dimensions (no layout shift), fingerprinted assets with SRI, minimal JavaScript that is always progressive enhancement, and a print stylesheet that drops the chrome and forces the light palette onto paper

  • Rhythm debug overlay — a built-in typographic x-ray, described below

Rhythm debug overlay

All vertical spacing in the text column follows a line-box rhythm — one line of text, 27px for Latin and 30.6px for Chinese. Every gap between blocks is a multiple of it. To keep that honest, the theme ships its own inspection tool. Switch it on from the browser devtools console:

Js
document.body.classList.add('debug')

The page then reveals a baseline dot grid (one row per line box), outlines around every block (headings in orange), and translucent bands marking each block’s margins — a gap that drifts off the grid becomes impossible to miss.

The overlay is also what makes AI-assisted development of this theme trustworthy. Typography is normally judged by eye, which is hard to hand off to a machine; here an agent gets verifiable evidence instead. One screenshot answers whether every gap still lands on the rhythm grid, and because the margin bands mirror the spacing tokens exactly, any drift between code and overlay is visible at a glance. The agent can check its own work, so human and machine review the same picture.

Nothing is loaded for readers: the overlay is pure CSS, inert behind that one class, adapted from the debug mode on Rasmus Andersson’s own site.

Credits

  • Hugo — the static site generator this runs on

  • Hanken Grotesk font by Hanken Design Co.

  • Inter font by Rasmus Andersson

  • Source Code Pro font by Adobe

  • Noto Sans SC font by Google & Adobe

  • KaTeX by Khan Academy

  • Theme architecture inspired by Tony Zorman’s personal site