-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add ability to override computed template context variables #743
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
Comments
Is this solved for you? It seems that you got help in #681 and fixed it on your own, right? :) |
It's been a while but looking at the current source code it seems the values are still computed here and they get appended to the user's configuration here. So the original use case of having Github account details but then setting If that's correct, I think there should be a way of overriding the template context variables after both loading of the user's configuration and readthedocs' processing of that configuration. |
If this issue is about removing the "Edit on " button, there is a guide on the docs for that https://docs.readthedocs.io/en/latest/guides/remove-edit-buttons.html |
I think there are a few issues addressing this, but as we've discussed internally about this in the past, I think our context variables shouldn't override settings unless we are absolutely sure we want to force RTD behavior on the docs. |
There seems to be no straightforward way to override already computed template context variables, such as "display_github". It is computed here:
doc_builder.backends.sphinx.Builder._whitelisted
and I want to set it to False (use case: using the existing theme but removing the "Edit on GitHub" button).However, reviewing RTD_CONF_ADDITIONS shows that all I can do is define a variable called "html_context" and add the already computed template context to that. But there seems no way to let the Builder compute all the Github values and set display_github to False afterwards.
The text was updated successfully, but these errors were encountered: