Reject duplicate docs IDs

Merged
AL
11h ago
+123-16

What changed

  • Disambiguated the authored Chart Factories headings and grouped chart() only once.
  • Renamed repeated capability-matrix Notes sections in both the generator and generated docs/spec output.
  • Added duplicate-ID validation to the existing prerendered HTML route checker, covering complete pages and redirects.

Why

Authored and generated headings collided on Chart Factories, while repeated Notes headings collided on the Capability Matrix. Duplicate IDs make anchor links and generated navigation ambiguous.

Impact

Public docs routes now reject duplicate IDs during the existing post-build route validation without adding a separate source checker or dedicated test suite.

Validation

  • docs/app/.venv/bin/pytest -q docs/app/tests — 103 passed, 1 xfailed
  • docs/app/.venv/bin/ruff check .
  • docs/app/.venv/bin/ruff format --check .
  • docs/app/.venv/bin/codespell .
  • docs/app/.venv/bin/python scripts/gen_capability_matrix.py --check

Fixes #396

Summary by CodeRabbit

  • Documentation
    • Clarified the chart factory reference by separating chart() and facet_chart() into their respective groups and renaming the shared props section to “Chart Container Props.”
    • Renamed generic notes headings to identify whether they apply to mark styles, chrome slots, or extension points.
  • Bug Fixes
    • Documentation route checks now flag duplicate non-empty HTML IDs, including IDs in inline SVG, and identify the affected route and HTML file.