Devlog

A shell, a search box, and a base path that broke everything

Home, six hubs and Pagefind went up in a night. Then the first deploy to GitHub Pages turned every hand-written link into a 404, and the fix was a nine-line helper.

The shell came together quickly: a Home with the series timeline, six hubs filtered out of shared content collections, and Pagefind for search. Both briefs called static search non-negotiable for a reference site, and the design pass had dropped the search box for a cleaner header. That was read as a design omission rather than a decision to ship without search, so it went into the header's spare column where nothing had to move.

Then it went to GitHub Pages as a project site, served from /IGA/, and a good half of the links broke. Astro rewrites the URLs it generates itself, but not the ones written by hand — and the site was full of hand-written ones. The fix is a small helper that prefixes a path with the configured base, applied everywhere a link is authored.

The over-correction came immediately after. Pagefind's result URLs already carry the base, because it derives its site root from wherever pagefind.js was loaded from. Prefixing those too produced /iga/iga/caesar3/. The rule that came out of it: prefix paths you write, never paths a tool hands you.