-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[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
[BUG] Fix redirect-from Sphinx extension #27915
Conversation
Update merge_domaindata to match Sphinx example implementation https://github.com/sphinx-doc/sphinx/blob/5523c9bbe4d1415777669330411d4f00ad802f18/sphinx/ext/todo.py#L90-L92
Check causes build to fail when Sphinx uses a cached build environment. We can just rewrite the cached redirect.
There was a problem hiding this 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?
If the docs build successfully the first time with no changes, Sphinx will load in a cached build environment with |
But that suggests the checks are doing their job and we still have a bug? |
* Added domain.redirects sanity check back in * Clear cached redirects from the domain
…com/AnsonTran/matplotlib into fix-sphinx-redirect-from-directives
Added the sanity checks back in. Also added a function to clear the domain redirects, so build doesnt fail when rebuilding without doing a |
Implement suggested changes Co-authored-by: Elliott Sales de Andrade <[email protected]>
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