Add version switcher dropdown
- Dominant language
- Python
- Stars
- 7
- Forks
- 10
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 5
Description
# 📚 Documentation Request
We should add a version switcher to allow easier switching between versions of the documentation.
## Addition
This is provided as part of the [pydata sphinx theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html).
## Detail
This will likely mean refactoring our existing [documentation GitHub actions workflow](https://github.com/MetOffice/ANTS/blob/dbda2a48738af462776ad85da7ea308a6168a703/.github/workflows/ci-documentation.yml).
A few key differences:
- The new implementation will likely have to make use of a `gh-pages` branch, which holds the built docs as html
- The `gh-pages` branch will contain directories for each version of the docs (3.0, 3.1, latest...)
- We'll need a [switcher.json](https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html#add-a-json-file-to-define-your-switcher-s-versions) file to map the locations of each version of the docs to be hosted
- The workflow will need to trigger on pushes to main, or to a `v*` release branch, or potentially on workflow dispatch? The built docs should then be pushed to the relevant directory of the `gh-pages` branch
- The workflow may also need to update the `switcher.json`, or this could be handled manually
- We may also need to create branches for the previous releases and add the version switcher to the docs. Currently, building the docs from the [`v3.0.0`](https://github.com/MetOffice/ANTS/releases/tag/v3.0.0) tag will *not* include the version switcher
Contributor guide
Assessment
This issue has not been assessed yet.