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: use the link shortener #8700

Merged
merged 2 commits into from
Feb 10, 2024
Merged

docs: use the link shortener #8700

merged 2 commits into from
Feb 10, 2024

Conversation

12rambau
Copy link
Contributor

@12rambau 12rambau commented Feb 4, 2024

In the recent version of the pydata-sphinx-theme (that you use through the sphinx-book-theme) we implemented a link shortener that would (I think) be a good replacement for the custom :issue: role. I was passing by, I made a small adjustment so you can see the diff and if you don't like it, simply close my PR.

https://xray--8700.org.readthedocs.build/en/8700/internals/extending-xarray.html

In the recent version of the pydata-sphinx-theme (that you use through the sphinx-book-theme) we implemented a link shortener that would (I think) be a good replacement for the custom `:issue:` role. I was passing by, I made a small adjustment so you can see the diff and if you don't like it, simply close my PR.
Copy link

welcome bot commented Feb 4, 2024

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@mathause
Copy link
Collaborator

mathause commented Feb 4, 2024

The example is at https://xray--8700.org.readthedocs.build/en/8700/internals/extending-xarray.html (towards the bottom).

Looks nice.

  • Could be a bit more difficult to replace if we ever move away from sphinx-book-theme?
  • Is the idea that it renders more nicely in a raw rst?
  • Is there a way to define a "first-party" package?
  • Does it also work for pull requests?

@12rambau
Copy link
Contributor Author

12rambau commented Feb 4, 2024

This is inherited from the pydata-sphinx-theme and we documented it here

Could be a bit more difficult to replace if we ever move away from sphinx-book-theme?

There is a trade of for nice looking things and we were forced to go beyond what sphinx had to offer, I guess only you can answer this one. I personnaly think it worth the shot.

Is the idea that it renders more nicely in a raw rst?

The idea is just to use the functionalities of the newly elected theme to there fullest, the previous one was working as well.

Is there a way to define a "first-party" package?

The first party package is detected from the link structure

Does it also work for pull requests?

Works for most of the Github like items (organization, users, repo, issues, comments, PR, tags...)

@dcherian
Copy link
Contributor

Thanks @12rambau

@dcherian dcherian merged commit b9e129f into pydata:main Feb 10, 2024
33 checks passed
Copy link

welcome bot commented Feb 10, 2024

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants