Skip to content
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

Merged
merged 6 commits into from May 17, 2021

Conversation

ngnpope
Copy link
Member

@ngnpope ngnpope commented Apr 28, 2021

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 as https://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:

@ngnpope ngnpope changed the title Fixed broken links and used canonical links in documentation. Refs #32720 -- Fixed broken links and used canonical links in documentation. May 6, 2021
@felixxm felixxm self-assigned this May 17, 2021
Copy link
Member

@felixxm felixxm left a 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.

docs/releases/security.txt Outdated Show resolved Hide resolved
docs/releases/security.txt Outdated Show resolved Hide resolved
docs/releases/security.txt Outdated Show resolved Hide resolved
docs/conf.py Outdated Show resolved Hide resolved
docs/internals/mailing-lists.txt Outdated Show resolved Hide resolved
docs/internals/mailing-lists.txt Outdated Show resolved Hide resolved
docs/ref/contrib/gis/install/index.txt Outdated Show resolved Hide resolved
docs/releases/1.11.txt Outdated Show resolved Hide resolved
docs/releases/1.8.8.txt Outdated Show resolved Hide resolved
docs/internals/howto-release-django.txt Outdated Show resolved Hide resolved
@felixxm felixxm changed the title Refs #32720 -- Fixed broken links and used canonical links in documentation. Fixed #32720 -- Added configuration and docs for Sphinx link checker. May 17, 2021
Copy link
Member Author

@ngnpope ngnpope left a 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.

docs/internals/howto-release-django.txt Outdated Show resolved Hide resolved
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.
@felixxm felixxm merged commit 0851933 into django:main May 17, 2021
@ngnpope ngnpope deleted the linkcheck branch May 17, 2021 10:37
ngnpope added a commit to ngnpope/drf-spectacular that referenced this pull request Apr 20, 2022
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
ngnpope added a commit to ngnpope/drf-spectacular that referenced this pull request Apr 21, 2022
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants