🗑️ chore: remove outdated instructions and migration documentation

This commit is contained in:
2026-02-25 20:45:46 +00:00
parent 602fd6101f
commit 3c3e70b474
10 changed files with 155 additions and 196 deletions

24
api/hooks/ssr/AGENTS.md Normal file
View File

@@ -0,0 +1,24 @@
# SSR and Caching
Server-side rendering via goja (Go JS runtime) with HTML caching.
## Request flow
1. `get_read.js` receives the request and calls `lib/ssr-server.js`.
2. `ssr-server.js` renders the Svelte app via `lib/app.server.js` and injects `window.__SSR_CACHE__`.
3. On the client, `lib/ssr.js` hydrates using the injected cache data.
4. Rendered HTML is stored in the `ssr` collection with dependency tracking.
## Build
- SSR bundle is built via `yarn build:server` and outputs to `lib/app.server.js`.
- The build uses `--banner:js='// @ts-nocheck'` to suppress type errors in the generated bundle.
## Cache invalidation
- `clear_cache.js` hook invalidates SSR cache entries based on collection dependencies.
- When content changes, only SSR entries that depend on the changed collection/entry are cleared.
## Route validation
SSR route validation is currently disabled and returns -1 in `config.js`; update this when enabling SSR per route.