Skip to content

Add a _selftest.yml guard: fail if a reference page has no website sidebar entry #430

Description

@d-morrison

Follow-up from #273 / #429 (the reviewer and the issue both suggested it).

Problem

A new website/reference/<name>.qmd page can land without a matching entry in website/_quarto.yml's Reference sidebar, leaving it reachable only by direct URL. #273 filed with 4 missing pages; by the time #429 fixed it, the set had drifted to 8 -- direct evidence that manual upkeep does not hold.

Proposal

Add a step to _selftest.yml (or a small script it runs) that fails when any website/reference/*.qmd is absent from website/_quarto.yml's sidebar:

missing=0
for f in website/reference/*.qmd; do
  b=$(basename "$f")
  grep -q "reference/$b" website/_quarto.yml || { echo "::error::$b missing from _quarto.yml sidebar"; missing=1; }
done
exit $missing

Optionally also assert the sidebar order matches website/workflows.qmd's catalog order (as #429 verified by hand), so the two stay in sync. This is the algorithmatize-checks move: turn the manual grep #273/#429 ran into a standing check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions