Expand description
ISR build manifest — dist/.ssg/manifest.json.
The manifest maps every output URL to its exact source dependency set (markdown file + layout + partials + data files) plus a content hash of those dependencies. The Edge renderer consults this manifest to (a) find which sources to fetch from KV / Edge Config, and (b) detect cache invalidation when sources change.
Shape (canonical, stable):
{
"version": 1,
"generated_at": "<rfc3339 timestamp or build-id>",
"default_cache": { "s_maxage": 60, "swr": 86400 },
"entries": {
"/posts/foo/index.html": {
"sources": ["content/posts/foo.md", "templates/post.html"],
"hash": "<sha256-hex>",
"cache": { "s_maxage": 600, "swr": 3600 }
}
}
}cache is omitted at the entry level when the page wants the
site-wide default (default_cache). Per-route overrides come from
frontmatter (isr.s_maxage, isr.swr).
§Determinism
Entries are written in lexicographic URL order so the manifest is byte-stable for a given input set — critical for CDN cache keys and reproducible builds.
Structs§
- Cache
Policy - Per-page
Cache-Controlknobs. - Manifest
- Complete ISR build manifest — emitted as
dist/.ssg/manifest.json. - Manifest
Entry - One entry in the ISR manifest — describes how one URL renders.
Constants§
- DEFAULT_
SWR - Default
stale-while-revalidate(seconds). 24 h matches theCache-Control: stale-while-revalidate=86400snippet in the architecture doc. - DEFAULT_
S_ MAXAGE - Default
s-maxage(seconds) the manifest emits when a page does not override via frontmatter. 60 s tracks the per-route SLA quoted in issue #546. - MANIFEST_
VERSION - Schema version of the manifest. Bump when the on-disk shape changes in a way edge adapters need to detect.
Functions§
- build_
entry - Builds a
ManifestEntryfrom sources + their bytes. - hash_
sources - Computes the canonical SHA-256 hex digest for a set of source bytes.