Recipes

This document defines how recipe modules are discovered from disk.

Root

Given MIME type/subtype, recipe directory is:

WARC Recipes

application/warc recipes run at the whole-site layer instead of one page at a time. You can use them for site-wide transforms, such as adding trailing-slash redirects, verifying there are no broken links, or using the path to modify body content.

Execution Context

WARC recipes can run in two useful scopes. We prefer picking scope intentionally because it changes cost and feedback speed.

Claim: use subset scope while developing recipe logic, and whole-site scope before publishing. Reason: it shortens edit-test cycles without skipping the final archive semantics. Example:

# Fast single-path iteration:
qip router get ./site /docs/router --recipes ./recipes

# Final whole-site run:
qip router warc ./site --recipes ./recipes --modules ./modules

Host And URLs

qip router warc controls canonical route host via --host <host>. We prefer setting this explicitly for production builds so recipe logic that reads target URLs sees stable, deploy-intended origins.

Example:

qip router warc ./site --recipes ./recipes --host https://qip.dev

Adding Routes

WARC recipes can synthesize or rewrite archive records, which means they can add output routes (for example /sitemap.xml) when they emit additional WARC records.

Ordering

Filename format:

Disabled filename format:

Examples:

Tie-Breaking

Validation

Host should reject recipe entries if:

Host should ignore non-.wasm files in the recipes tree.

Scope