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

docs: ensure edit links point to main branch #1246

Merged
merged 2 commits into from
Mar 21, 2023
Merged

Conversation

12rambau
Copy link
Collaborator

Fix #1237

Proposal to solve the issue using solution 1.

  • overwrite our template to add an extra method in the url parsing
  • create a to_main method to digest the link and reroute it to main branch

Copy link
Collaborator

@drammock drammock left a comment

Choose a reason for hiding this comment

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

If you didn't already do this @12rambau I think maybe we should check how other extensions do this? You'll see below my comment about hard-coding "main" that seems fragile; I'd like to think that there's a way to avoid that.

docs/_templates/edit-this-page.html Outdated Show resolved Hide resolved
docs/conf.py Show resolved Hide resolved
Co-authored-by: Daniel McCloy <dan@mccloy.info>
@12rambau 12rambau marked this pull request as ready for review March 21, 2023 13:09
@drammock
Copy link
Collaborator

hmm, not working on the CI build: on this page https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/index.html the "edit on GitHub" link goes here: https://github.com/pydata/pydata-sphinx-theme/edit/d7be3e599ef634820f0b1e049fc1f69e4707d05a/docs/user_guide/index.md (which is a 404). Is there reason to expect it to fail on CI builds but work in deployment?

Copy link
Collaborator

@drammock drammock left a comment

Choose a reason for hiding this comment

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

argh, never mind, I clicked the wrong link on this page so I was viewing the current dev docs, not the PR docs. This looks to be working as expected.

@drammock drammock merged commit e206dee into pydata:main Mar 21, 2023
@12rambau 12rambau deleted the github branch March 21, 2023 15:32
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.

Edit on GitHub link is broken on our stable docs
2 participants