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
Sphinx linkcheck fails for GitHub link with anchor in CI #1272
Comments
There were attempts in the past to fix this for GitHub but were reverted: sphinx-doc/sphinx#9016 (comment). I think that prefixing the anchors with |
@webknjaz That doesn't seem to work: https://github.com/pypa/packaging.python.org/actions/runs/5728400351/job/15522879153?pr=1279 |
@di oh, it looks like they've changed the HTML layout to remove those anchors from the initial HTTP response entirely, and it's all being rendered on the front end now. I suppose we just need to mass-ignore any GH code-line anchors, after all... |
I'm just going to drop the anchor here, it doesn't seem specifically necessary. |
Made a suggestion here: https://github.com/pypa/packaging.python.org/pull/1279/files#r1280808096 |
There is the config value linkcheck_anchors_ignore for Sphinx. I think we could employ this to allow adding GitHub anchors. |
Problem
Sphinx linkcheck fails for https://github.com/pypa/pip/blob/main/setup.py#L11 in CI.
This is likely due to Github making the file viewer require Javascript, which breaks linkcheck's anchor checks.
Approaches
From specific to general:
For now I'm leaning towards approach 2 or 3.
The text was updated successfully, but these errors were encountered: