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

Edit Button on Documentation page not working for stable #12872

Open
1 task done
buti1021 opened this issue Jul 23, 2024 · 3 comments
Open
1 task done

Edit Button on Documentation page not working for stable #12872

buti1021 opened this issue Jul 23, 2024 · 3 comments
Labels
type: bug A confirmed bug or unintended behavior type: docs Documentation related

Comments

@buti1021
Copy link

Description

Navigate to https://pip.pypa.io/en/stable/installation/
Click on the edit icon in the top right corner.

Expected behavior

Github Page to fork/make changes, probably based of the latest version, not of the stable version.

Current behaviour

Github 404 as the commit seems not to be found, works fine when on latest

pip version

current

Python version

n.a.

OS

n.a.

How to Reproduce

n.a.

Output

No response

Code of Conduct

@buti1021 buti1021 added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Jul 23, 2024
@pradyunsg pradyunsg added type: docs Documentation related and removed S: needs triage Issues/PRs that need to be triaged labels Jul 23, 2024
@matthewhughes934
Copy link
Contributor

The button links me to https://github.com/pypa/pip/edit/76e82a43f8fb04695e834810df64f2d9a2ff6020/docs/html/installation.md that commit exists and is tagged https://github.com/pypa/pip/releases/tag/24.1.2 (i.e. the latest tag)

The file exists at that path for that commit https://github.com/pypa/pip/blob/76e82a43f8fb04695e834810df64f2d9a2ff6020/docs/html/installation.md, but opening that link the edit button/pencil in the top right is greyed out for me with a mouse-over message:

You must be on a branch to make or propose changes to this file

The docs for latest link to main so I would expect editing to work fine there, since main is a branch. I'm not sure if this worked differently in the past and just stopped, or if this never worked?

For potential solutions, here's what some other projects are doing:

  • https://nextjs.org/docs: link just takes you to the file itself (like the working link I shared above) using the tag as a reference. That doesn't 404 but you still can't edit the file since you're not on a branch
  • https://coverage.readthedocs.io/en/7.6.0/: does the same
  • https://cibuildwheel.pypa.io/en/stable/: edit link points to main. I guess the file contents the user saw from the docs site and the contents they see in GitHub may differ in the case there are changes in main that aren't included in whichever version of the docs they were reading

@matthewhughes934
Copy link
Contributor

🤔 what's adding that link? It's not present when I nox -s docs locally/searching around I don't . Is ReadTheDocs injecting it? https://docs.readthedocs.io/en/stable/guides/edit-source-links-sphinx.html suggests you can configure sphinx and then manually add some HTML template, but these docs don't look to be doing that?

Maybe related: readthedocs/readthedocs.org#1820

Digging further, is this just: pradyunsg/furo#668? I see furo is the HTML theme in docs/html/conf.py so I guess that might be adding the button?

@pradyunsg
Copy link
Member

Digging further, is this just: pradyunsg/furo#668?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A confirmed bug or unintended behavior type: docs Documentation related
Projects
None yet
Development

No branches or pull requests

3 participants