Stitch Together Lots of Little HTML Pages with Navigations for Interactions
Source: Hacker News
Why I Like It
I wrote about building websites with LLMs — (L)ots of (L)ittle ht(M)l page(s) — and I think it’s time for a post‑mortem on that approach.
I’ve tweaked a few things from that original post but the underlying idea is still the same:
Avoid in‑page interactions that require JavaScript in favor of multi‑page navigations that rely on HTML and are enhanced with CSS view transitions (and a dash of JS if/where prudent).
A Real‑World Example
On my blog I have a Menu. It doesn’t “expand”, “slide out”, or “pop in” with JavaScript. Instead, it navigates to an entirely new page that is focused on just the menu options of the site.
The navigation is just a link:
[…](/menu/)
and the interaction is enhanced by CSS view transitions.
- Modern browser? You get a nicer effect.
- Older browser, disabled JS, etc.? It still works because a link is the most fundamental thing a browser can do.
How It Works Under the Hood
All pages (except the menu page) contain a link to the menu. When you navigate to the menu, that link changes to an “X” that closes the menu. The closing link is still just a link back to /, but it’s enhanced with a tiny bit of JavaScript to perform a history.back() when possible, preventing an extra entry in the browser history.
…
The document.referrer check determines whether the user arrived via navigation (most likely from within the blog) or directly (e.g., typed the URL). If there’s a meaningful history entry, history.back() is used; otherwise, the page redirects to the home URL.
Visual Overview

Video Demonstration
(Insert video embed or link here if desired.)
Reflections
While this solution seems simplistic, arriving at it required careful thought about what is essential to navigation, how the interaction could span multiple pages, and how to keep page size small for fast, robust, and intuitive use. In other words, the approach shaped the design.
When you treat the browser primarily as a document navigator rather than a runtime for arbitrary code, the resulting architecture can be far simpler than many modern tools lead us to believe.