Skip to content

Fix linkcheck - #1484

Merged
chrysle merged 1 commit into
pypa:mainfrom
jeanas:linkcheck
Jan 15, 2024
Merged

Fix linkcheck#1484
chrysle merged 1 commit into
pypa:mainfrom
jeanas:linkcheck

Conversation

@jeanas

@jeanas jeanas commented Jan 14, 2024

Copy link
Copy Markdown
Contributor

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/

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

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

EpicWink commented Jan 15, 2024

Copy link
Copy Markdown
Contributor

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

jeanas commented Jan 15, 2024

Copy link
Copy Markdown
Contributor Author

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
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