Recipes

This document defines how recipe QIP components 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. Pick the scope based on the question you are answering.

Use subset scope while developing recipe logic. Use whole-site scope before publishing so final archive semantics are still exercised.

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

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

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 --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 #