#!/usr/bin/env python3
"""Post-build checks for the generated site. Stdlib only.
`build_site.py` fails loudly on bad *input*; this checks the *output*, so the
SEO and accessibility guarantees documented in docs/site-maintenance.md stay
true as pages are edited. Run in CI right after the build:
python3 scripts/build_site.py && python3 scripts/check_site.py _site
Checks, per page: exactly one
, lang="en", non-empty descriptive alt on
every image, every local href/src resolves inside the output, no leftover
{{PLACEHOLDER}}, canonical == og:url == the sitemap , the full Open
Graph / Twitter card set present with an absolute image that exists
(twitter:image == og:image, width/height tags matching the PNG, under 1 MB),
rel=icon and rel=apple-touch-icon links present, JSON-LD
parses and is the expected @type. Site-wide: titles and descriptions are
distinct, sitemap.xml is well-formed and lists exactly the generated pages,
robots.txt carries an absolute Sitemap: line, no page contains an em or en
dash (house copy standard; use a hyphen), and no page references a
tracker, an external asset, or any