-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Do not overwrite sphinx context variables feature #4349
Do not overwrite sphinx context variables feature #4349
Conversation
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.
Nice! Looks good to me 👍
I think if we did a sample of projects, this will be a good test that helps us answer how backwards compatible we need to be when implementing a versioned context_data.
Agreed |
It's going to be almost impossible to tell if these builds fail or have unexpected behavior because of the change though. If we logged or collected metrics on the number of times we hit a user-specified key that would probably be the most valuable. |
I like it. This metric could help us to understand the context better than a failed build. Do we have a table for saving this kind of things already? |
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.
Good and simple enough!
I want to mention that I would like to do the same for the readthedocs.v1
context by default (the new design) and remove the warning from the bottom of this page: https://docs.readthedocs.io/en/latest/design/theme-context.html#customizing-the-context and allow users to override only one key and not the whole readthedocs.v1
object.
Of course, this is something to be done in a completely different PR.
There's a typo, SPINX -> SPHINX. |
The typo is fixed. |
This adds a feature flag (default off) that changes how
html_context
variables are clobbered inconf.py
. By default, we clobber whatever the user may have inhtml_context
if it matches variable names set by Read the Docs. This changes the setting to respect what a user may have and only overwrite if the user didn't set anything.