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

Fix linkcheck #1484

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Fix linkcheck #1484

merged 1 commit into from
Jan 15, 2024

Conversation

jeanas
Copy link
Contributor

@jeanas jeanas commented Jan 14, 2024

Apparently, GitHub now adds the README HTML on a project page dynamically through JS, which prevents Sphinx's link checker from finding anchors into the README.


📚 Documentation preview 📚: https://python-packaging-user-guide--1484.org.readthedocs.build/en/1484/

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to disable checking anchors instead?

@EpicWink
Copy link
Contributor

EpicWink commented Jan 15, 2024

Try linkcheck_anchors_ignore_for_url:

# conf.py
linkcheck_anchors_ignore_for_url = [
  r"^https://github\.com/[^#]+#.+",
]

This will ignore anchors for all GitHub links

Apparently, GitHub now adds the README HTML on a project page
dynamically through JS, which prevents Sphinx's link checker from
finding anchors into the README.
@jeanas
Copy link
Contributor Author

jeanas commented Jan 15, 2024

Oh, I didn't know that option, thank you.

@chrysle chrysle added this pull request to the merge queue Jan 15, 2024
Merged via the queue into pypa:main with commit 1735f70 Jan 15, 2024
5 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.

4 participants