Skip to content
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

Support RTD version selector #8

Open
manics opened this issue Mar 3, 2023 · 4 comments
Open

Support RTD version selector #8

manics opened this issue Mar 3, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@manics
Copy link
Member

manics commented Mar 3, 2023

Proposed change

Older versions of the JupyterHub docs e.g. 3.0.0 had a version selector, allowing you to switch to other versions of the docs.

This seems to have been lost in JupyterHub 3.1.0, probably with the switch to the pydata theme?

Alternative options

Do nothing

Who would use this feature?

Users wanting to view docs for versions of JupyterHub other than the latest

(Optional): Suggest a solution

Instructions in pydata for enabling the version switcher:
https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html

The main requirement seems to be a JSON file with a fixed URL containing the list of versions. Is this file automatically created by readthedocs, and can we automatically set this URL?

@manics manics added the enhancement New feature or request label Mar 3, 2023
@welcome
Copy link

welcome bot commented Mar 3, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@choldgraf
Copy link
Member

The pydata theme should support RTD dropdowns out of the box...that is weird! Do you see any errors in the JavaScript console?

@manics
Copy link
Member Author

manics commented Mar 5, 2023

There are no javascript errors.

I've found the original pydata-sphinx-theme PR: pydata/pydata-sphinx-theme#436
It doesn't look like the version selector is automatic- the PR added support for the version dropdown (disabled by default) and also added the repo-specific config to enable the dropdown.

The list of versions is manually managed, it's not automatically detected:
https://github.com/pydata/pydata-sphinx-theme/blob/main/docs/_static/switcher.json

The pydata-sphinx-theme release process includes this as a step:

- [ ] Update our version switcher .json file with the new version

@choldgraf
Copy link
Member

choldgraf commented Mar 5, 2023

The JSON switcher is a way to manually have a version switcher if you don't want to use the RTD one (and if you manually want to maintain versions in a single JSON). So maybe there's a feature flag for the RTD one too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants