New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #32720 -- Added configuration and docs for Sphinx link checker. #14325
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pope1ni Thanks for this patch 👍 I reorganized commits, corrected hashes in the security archive, updated links to the mailing lists, and pushed small edits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tweaks Mariusz.
We explicitly ignore checking anchors for line-range anchors on GitHub which are dynamically generated and, otherwise, show up as broken links. See sphinx-doc/sphinx#7388 (comment). We also ignore links to resources that require authentication.
Also updated links to canonical locations to reduce redirects. These were discovered using `make linkcheck`. I did something similar a while back for Django: django/django#14325
Also updated links to canonical locations to reduce redirects. These were discovered using `make linkcheck`. I did something similar a while back for Django: django/django#14325
ticket-32720
I've used the linkcheck builder in Sphinx to identify a number of broken links that I've fixed, and updated others to use the canonical link so that unnecessary redirects are avoided.
Ideally, the output generated in
docs/_build/linkcheck/output.{json,txt}
would only contain "working" links, but there are some links that are better left redirecting, e.g. for documentation versions such ashttps://docs.djangoproject.com/en/stable/
→https://docs.djangoproject.com/en/3.2/
. There is an open issue for adding a configuration setting to allow certain redirects to be treated as "normal". See sphinx-doc/sphinx#6525 (comment).Questions:
docs/internals/contributing/writing-documentation.txt
about using the linkcheck builder?docs/internals/howto-release-django.txt
about checking before preparing a release?If Link checker should be able to prohibit unknown redirects sphinx-doc/sphinx#6525 is resolved, would this check be useful to add to a scheduled action in GitHub?