Static implementation guide

Build-Time Content Validation

Fail early when guide slugs, relationships, dates, descriptions, or article structures would create inconsistent static output.

Last updated 2026-08-28

Validate the authored model

A small local content package keeps both projects on one source of truth. At module load, validation checks that slugs use a safe lowercase pattern and are unique, required text is present, dates use a stable calendar format, and every guide contains multiple meaningful sections. Relationship targets must resolve to another real guide.

These rules protect more than rendering. The slug collection defines static paths, sitemap locations, home-page links, canonical URLs, and related navigation. One malformed item could otherwise produce several different defects that only appear after deployment.

Make failures actionable

Validation errors identify the guide and field that failed so an editor can correct the source directly. The package has no separate compilation step and exports plain serializable objects, which keeps both Next.js builds deterministic and avoids runtime content fetching.

Run validation as part of every build rather than as an optional lint command. When content changes, build the origin first to prove every static path renders, then build the gateway to regenerate its sitemap and discovery links from the same verified collection.