Commit 9a2fffa
site: render /download per request so it cannot freeze on an old release
The download page advertised 0.1.3 and linked to 0.1.3 binaries while
install.sh was handing out 0.1.7. Both read the same GitHub "latest"
endpoint, so the difference was not the data -- it was when it was read.
`export const revalidate` alone makes the page STATIC: Next prerenders it
at build time and that HTML ships inside the image, so the version and the
download links freeze to whatever was latest when the site was last built.
Revalidation regenerates in memory, and a container restart drops back to
the baked copy. The site sat on v0.1.3 through four releases that way, and
would not have recovered on its own -- only a site rebuild per release
would have kept it honest, which couples the site deploy to the release.
force-dynamic renders per request instead, so the page is right within an
hour of any release with no redeploy at all. The hourly cache on the fetch
in latestRelease() still applies, which is what keeps this from turning
every page view into a GitHub call: measured 1 API call across 5 views
against a production build, so the unauthenticated 60/hr limit is not in
play. Verified the built page reports 0.1.7 and links at v0.1.7 assets,
and that the route is emitted as dynamic rather than static.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhwDgBphuy2UKenqMKkezQ1 parent 7b7f89e commit 9a2fffa
1 file changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
15 | 26 | | |
16 | 27 | | |
17 | 28 | | |
| |||
0 commit comments