Section 7 · Learn · Engineering
Static export and precomputed interaction
Shipping a site as plain files with no server, and making it interactive by committing captured state instead of querying a backend.
Shipping a site as plain files with no server, and making it interactive by committing captured state instead of querying a backend.
What it is
Every route is rendered to HTML at build time. There is no server process, no API and no database behind the site.
Why it is needed
Hosting is free and the attack surface is essentially zero. The constraint is that nothing can run a live query.
How it works
Interactive elements replay real state captured offline: run the pipeline, capture the intermediate results, commit them as JSON, and let the client move between them.
In this project
The site renders committed JSON and never queries the platform. Interactive demos read from data/interactive/, where each dataset carries the script that produced it and the command that regenerates it. The demos degrade honestly: with JavaScript disabled the reader still gets the full table of figures rendered server-side, not a blank box.
Trade-offs
Advantages
- Free hosting, no runtime to attack
- Content is present without JavaScript and is indexable
- Every figure traces to a committed file
Limitations
- Nothing can be live
- Demo data must be regenerated when the pipeline changes
- Large datasets inflate the repository
Common mistakes
- Synthesising demo data because the real pipeline is not ready
- Interactive states with no number attached
When to use it
Reach for it when
- Documentation and result sites whose data changes on a build cadence
Avoid it when
- Genuinely live or per-user data
How it interacts with the rest of the system
Provenance and reproducibilityHydration and HTML nesting