Skip to content

Derive generated docs paths from the catalog - #36

Merged
TMHSDigital merged 1 commit into
TMHSDigital:mainfrom
maoji-y:fix/generated-docs-hygiene
Nov 15, 2026
Merged

TMHSDigital merged 1 commit into
TMHSDigital:mainfrom
maoji-y:fix/generated-docs-hygiene

Conversation

@maoji-y

@maoji-y maoji-y commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #30.

Adding a section could leave its generated index outside the hygiene check when the hand-maintained list was not updated. The checker now derives its generated paths from the catalog. The catalog tests also name the config and path when a generated file is missing from the Git, Markdownlint, or MkDocs git revision exclusions.

Checklist

  • Internal links resolve.
  • Markdown lint passes.
  • No new pages or navigation changes.

Validation

  • All 33 unit tests passed. The new-section hygiene regression failed on the original implementation.
  • Removing a generated path from each of the three config files in turn triggered the expected test failure.
  • Public repo hygiene, internal links, and the strict MkDocs build passed.

Codex assisted with the reproduction, implementation, and tests.

@TMHSDigital

Copy link
Copy Markdown
Owner

Thanks for picking up #30, this is clean. I merged it onto current main locally and ran the full check set, including the README sync test added since you branched. All checks pass. I also confirmed both safety nets by hand:

  • Removing docs/meta/index.md from .gitignore makes test_configs_exclude_generated_docs fail with ".gitignore must exclude generated paths: docs/meta/index.md".
  • Force-adding a generated docs/channels/index.md makes the hygiene check reject it.

Merging. A small optional follow-up, not needed for this PR: prepare-mkdocs.py still builds its output paths on its own, so it could use generated_doc_paths() too.

@TMHSDigital
TMHSDigital merged commit 40f67e7 into TMHSDigital:main Nov 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated-file list is maintained by hand in five places

2 participants