-
Notifications
You must be signed in to change notification settings - Fork 322
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
Integration with ReadtheDocs' new addons based version switcher (and other addons) #1933
Comments
More context about the addons: https://about.readthedocs.com/blog/2024/07/addons-by-default/ |
Thank you for flagging this; I have seen mentions around but have not looked deeply into it.
We have our own version warning in PST but will have a look nonetheless |
related: #1398 (which was capturing and re-styling the old injected RTD switcher, but never quite got over the finish line). That can maybe serve as a starting point for the styling, though it may also be stale enough to not bother with. crossref also to readthedocs/readthedocs.org#11474 (attn @trallard I'd been meaning to ping you there as a heads up) @Cadair IIUC, the way of integrating the new addon into this theme is to
(source: readthedocs/readthedocs.org#11474 (comment)). In other words, I think we need to write some JavaScript to:
It's also worth looking at whether we want to change our native JSON structure to something more similar to the new RTD JSON structure (not sure how (dis)similar they are, I haven't checked yet). It would mean code churn for our users, but it might avoid some nasty near-duplicated code. Or we could simply mutate our native JSON at load time to mimic theirs, that might be the least painful route. |
I don't mind having a shot at this in principal, but I don't know when I will find the time, but if I do I will make sure to post here. Thanks for all the info ❤️ |
Hi all 👋🏼 . I'm one of the authors behind the new Read the Docs Addons and the deprecation of the Sphinx context automatically injected. I just wanted to comment here in case you have doubts/questions. I'm happy to help with this transition to be as smooth as possible, so feel free to ask me any questions you may have regarding this. |
Hey folks, thanks for the ping! If not, I will try and carve some time to understand the implications and open a meta issue to track any actions needed on our end. |
I've not started in on this yet. |
I have just swung back to looking at this. It seems that the version warning injected by RTD isn't themed by pydata-sphinx-theme. It would obviously be good if we could make the RTD version warning show in the same style as the native pydata one. |
Read the Docs recently rolled out its new "addons" project. This broke assumptions made by code in our theme. In particular, it means that all of the code that tries to move the Read the Docs version switcher into the sidebar no longer works, so this pull request removes all of that code and updates the docs. I also removed the check for Read the Docs in the Ethical Ads template because as far as I understand, that template is opt-in anyway, meaning that sites that use our theme do not have that template included by default. Fixes #1794 and possibly #1238. This pull request does not address #1933, which is about providing a better integration with Read the Docs. The only goal of this pull request is to remove code that is broken as a result of the addons rollout.
disclaimer: I had a search around the repo for things looking similar to this, hope I am not missing anything
RTD have added a new "addons" based version switcher that doesn't go into the sidebar of the theme like the old one did, does anyone have any context or starting points for getting their new addons based version switcher integrated into the theme?
Also there are other addons, but maybe the version warning already is themed?
The text was updated successfully, but these errors were encountered: