A third instance of the pattern notebooks-export/ and the reading payloads already use: an artifact built somewhere with a toolchain this repo's node:24-slim container does not have, dropped into a gitignored directory, staged into public/ by a script, and picked up by auto-build.sh's signature on the next tick. Nothing here needs a JDK, Go, or an opinion about the game -- cannons_reloaded's deploy/export-cannons.sh hands over a directory that is already ready to serve. Three things are load-bearing and easy to get wrong later: The payload is at /cn/, not /cannons/. With build.format:'file' the page builds to cannons.html, and try_files would then have a file and a directory competing for the same URL. That is exactly why the notebook exports live at /nb/ and not under /notebooks/. nginx gets gzip_static for /cn/. nginx:alpine has `gzip on` commented out in its base config, so without it the page ships 9MB instead of 3.3MB and nothing anywhere reports that. It gets no-cache rather than an expiry, because classes.js and cannons.wasm are stable filenames whose contents change on every rebuild -- a long expiry would pair a stale client with a fresh server. The page loads on click, not `loading="lazy"`. Lazy only defers until the frame nears the viewport and this frame is above the fold, so a few MB would download for anyone who opened the page to read the paragraph. A missing export is a normal state throughout: copy-cannons.mjs stages nothing, the page says so, and the sidebar link does not appear. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S4wdbGSVzvUDHBWRjSVxfr
30 lines
750 B
JSON
30 lines
750 B
JSON
{
|
|
"name": "garden-astro",
|
|
"version": "0.1.0",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "astro dev",
|
|
"build": "node scripts/copy-assets.mjs && node scripts/copy-notebooks.mjs && node scripts/copy-cannons.mjs && astro build",
|
|
"preview": "astro preview"
|
|
},
|
|
"dependencies": {
|
|
"@fontsource/jetbrains-mono": "^5.3.0",
|
|
"@resvg/resvg-js": "^2.6.2",
|
|
"astro": "^5.0.0",
|
|
"github-slugger": "^2.0.0",
|
|
"katex": "^0.16.10",
|
|
"mermaid": "^11.0.0",
|
|
"rehype-katex": "^7.0.0",
|
|
"remark-math": "^6.0.0",
|
|
"satori": "^0.28.2",
|
|
"three": "^0.185.1",
|
|
"unist-util-visit": "^5.0.0"
|
|
},
|
|
"allowScripts": {
|
|
"esbuild@0.27.7": true,
|
|
"esbuild@0.25.12": true,
|
|
"sharp@0.34.5": true
|
|
}
|
|
}
|