Skip to main content

Module isr_manifest

Module isr_manifest 

Source
Expand description

ISR manifest emitter — dist/.ssg/manifest.json + raw content KV payloads under dist/.ssg/content/.

Runs as an after_compile plugin, but ONLY when the build opted into ISR via --isr (issue #546 AC9 — without the flag the plugin is not registered and the build stays byte-identical to v0.0.43).

Behaviour:

  1. Walks the content directory for .md files.
  2. For each markdown file, parses frontmatter to look for isr.s_maxage / isr.swr overrides.
  3. Derives the published URL using the existing slug rules.
  4. Emits a ManifestEntry listing the markdown source + the relevant templates as sources, with a sha256 over their bytes.
  5. Writes dist/.ssg/manifest.json and copies the raw sources into dist/.ssg/content/ so the deploy step can upload to KV.

Structs§

IsrManifestPlugin
after_compile plugin that emits the ISR manifest + raw KV payloads. Off by default; enabled by the --isr flag.

Constants§

CONTENT_RELATIVE_DIR
Subdirectory inside dist/.ssg/ that holds raw source payloads destined for KV / Edge Config upload.
MANIFEST_RELATIVE_PATH
Subdirectory inside dist/.ssg/ that holds the manifest.

Functions§

build_manifest
Builds a Manifest by walking content_dir for .md files and pairing each with the layout templates it would render against.