Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[BUG] Fix redirect-from Sphinx extension #27915

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

Merged
merged 14 commits into from
Mar 20, 2024

Conversation

trananso
Copy link
Contributor

PR summary

Closes #27911, closes #21876. This PR fixes the issue of redirect-from directives not
creating the relative refresh pages in the build.

PR checklist

Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

The clear_doc change to operating on a single document is correct. Clearing everything was a mistake.

Why do we have to delete the consistency checks?

@trananso
Copy link
Contributor Author

If the docs build successfully the first time with no changes, Sphinx will load in a cached build environment with domain.requests already populated. Hence, that check will cause the build to fail

@tacaswell
Copy link
Member

Sphinx will load in a cached build environment with domain.requests already populated. Hence, that check will cause the build to fail

But that suggests the checks are doing their job and we still have a bug?

@trananso
Copy link
Contributor Author

Added the sanity checks back in. Also added a function to clear the domain redirects, so build doesnt fail when rebuilding without doing a make clean.

@trananso trananso changed the title Fix redirect-from Sphinx extension [BUG] Fix redirect-from Sphinx extension Mar 14, 2024
@trananso trananso requested a review from timhoffm March 15, 2024 13:57
@trananso trananso requested a review from timhoffm March 18, 2024 16:40
Implement suggested changes

Co-authored-by: Elliott Sales de Andrade <[email protected]>
@QuLogic QuLogic merged commit bb3f0dc into matplotlib:main Mar 20, 2024
@QuLogic QuLogic added this to the v3.9.0 milestone Mar 20, 2024
@trananso trananso deleted the fix-sphinx-redirect-from-directives branch March 20, 2024 13:08
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.

redirect not working for updated contribute page [Doc]: redirect-from directive appears broken?
4 participants