Skip to content

Test that relative links and anchors in the docs resolve - #77

Open
reacher-z wants to merge 1 commit into
mainfrom
test/doc-links
Open

reacher-z wants to merge 1 commit into
mainfrom
test/doc-links

Conversation

@reacher-z

Copy link
Copy Markdown
Collaborator

README.md, tasks/README.md and docs/*.md link to each other, to assets and to workflow files by relative path and heading anchor. tests/test_doc_links.py resolves every relative link and image source and checks that each #anchor matches a heading in the target document, using GitHub's slug rules.

All links on main resolve. Renaming a heading or a file referenced from the docs makes the test fail with the source file and the broken link. docs/development.md mentions it.

  • uv run python -m unittest discover -s tests
  • uv run ruff check scripts src tests
  • uv run ruff format --check scripts src tests

README.md, tasks/README.md and docs/*.md link to each other, to assets
and to workflow files by relative path and heading anchor. A rename broke
nothing that CI would notice. The new test resolves every relative link
and image source, and checks that each #anchor names a heading in the
target document.
@reacher-z reacher-z added documentation Improvements or additions to documentation ci GitHub Actions and checks labels Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci GitHub Actions and checks documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant