Skip to content

Fix current version title links on 404 pages#266

Draft
Herrtian wants to merge 1 commit into
readthedocs:mainfrom
Herrtian:current-version-title-link
Draft

Fix current version title links on 404 pages#266
Herrtian wants to merge 1 commit into
readthedocs:mainfrom
Herrtian:current-version-title-link

Conversation

@Herrtian

Copy link
Copy Markdown

Fixes #9.

Summary

  • add a Read the Docs-only script on 404 pages to point logo/title links at the current version root
  • leave existing resource, search, and toctree URL handling on notfound_urls_prefix
  • add coverage for the Read the Docs 404 title-link behavior

Checks

  • venv\\Scripts\\python.exe -m pytest tests\\test_urls.py::test_default_settings tests\\test_urls.py::test_readthedocs_title_links_use_current_version_root tests\\test_urls.py::test_urls_prefix_setting tests\\test_urls.py::test_urls_prefix_setting_none tests\\test_urls.py::test_custom_404_rst_source tests\\test_urls.py::test_special_readthedocs_urls -q
  • venv\\Scripts\\python.exe -m compileall -q notfound tests
  • git diff --check

Note: a full local tests/test_urls.py run on Windows with Sphinx 8.2.3 had 21 passing tests and one existing failure in test_image_on_404_rst_source around the headerlink character assertion.

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.

Main title link points to default version instead of current one

1 participant