diff --git a/docs/decisions.md b/docs/decisions.md index 221151a..773778f 100644 --- a/docs/decisions.md +++ b/docs/decisions.md @@ -498,3 +498,24 @@ the same Origin. Expensive — a page assembled from parts that themselves compo `PhaseLoad` loses its example: includes turned out to be parse-phase, not load-phase. Revisit if: composing partials out of partials becomes a real need. That is textual splicing before parsing, and it wants the Stage pipeline's load phase rather than a second mechanism here. + +## ADR-0039 — `site.yaml` declares the site; the cascade below it stays deferred +Date: 2026-07-30 · Status: accepted (adopts the *site* level of the parked settings cascade in +`ideas/deferred-decisions.md`, and only that level) +Decision: a site root may hold `site.yaml` carrying declared site-level keys — `base` and `title` today. It +is read once at startup: absent is fine, since a bare site root still serves, but malformed is a fatal +startup error, because unlike one bad bundle it misconfigures every page. `-base` overrides the file when +given, so a staging host needs no edit to content. Section-level and bundle-level resolution are *not* built: +frontmatter already covers a bundle, and nothing reads a section override yet. +Why: absolute URLs are the forcing function — a canonical link, an `hreflang`, an OpenGraph tag and a sitemap +entry all require the site's own origin, which the engine cannot infer from a request it may be serving +behind any proxy. A flag alone would work, but the origin is a property of the site rather than of one +invocation, and it belongs in the site's own git history next to the content it describes. Building only the +site level keeps the earn-it rule honest: the cascade's cost is resolution per bundle, and nothing yet asks +for it. +Consequence: cheap — one file, two keys, read once, and a site that declares nothing keeps working with +relative links. Expensive — there is now a second place a setting can come from, so precedence has to be +stated wherever a key is documented; and the set of keys must stay declared or `site.yaml` becomes unbounded +config, which is the failure the parked cascade already warns about. +Revisit if: a section wants to set a policy for everything beneath it. That is the parked cascade arriving +for real, and its trigger is unchanged: the first section-level override with a reader. diff --git a/ideas/deferred-decisions.md b/ideas/deferred-decisions.md index dfc2b90..2b6f464 100644 --- a/ideas/deferred-decisions.md +++ b/ideas/deferred-decisions.md @@ -57,6 +57,10 @@ new field on every type. ## Settings cascade +Status: partly adopted → the **site** level is built as `site.yaml` (ADR-0039). The section and bundle levels +stay parked: frontmatter covers a bundle, and the trigger for the rest is unchanged — the first section-level +override with a reader. + Deferred because frontmatter alone covers the MVP; a cascade earns itself when a section-wide policy is actually wanted. ## Settings cascade: site → section → bundle