Skip to content

Add version selector to documentation #612

@laughingman7743

Description

@laughingman7743

Summary

Add a version selector to the documentation to allow users to easily switch between different versions (stable, latest, specific releases).

Background

Currently, the documentation is built from the master branch only. Users cannot easily access documentation for specific release versions or switch between versions.

Proposed Solution

Implement a version selector using sphinx-multiversion:

  1. Install sphinx-multiversion

    • Add to dependencies in pyproject.toml
  2. Configure sphinx-multiversion

    • Configure which branches/tags to build
    • Set up version naming conventions
    • Configure version selector UI
  3. Update GitHub Actions workflow

    • Build documentation for multiple versions (e.g., stable, latest, v3.18.0, v3.17.0, etc.)
    • Deploy all versions to appropriate directory structure
  4. Update Furo theme configuration

    • Add version selector dropdown to sidebar
    • Configure version display format

Example Implementation

# .github/workflows/docs.yaml
- run: |
    uv sync --group dev
    uv build
    sphinx-multiversion docs docs/_build/html
# docs/conf.py
extensions = [
    # ...
    "sphinx_multiversion",
]

# Sphinx-multiversion configuration
smv_tag_whitelist = r'^v\d+\.\d+\.\d+$'  # Match v1.2.3
smv_branch_whitelist = r'^(master|stable)$'
smv_remote_whitelist = r'^origin$'

Expected Behavior

Users should be able to:

  • See current version in the sidebar
  • Click version selector to see available versions
  • Switch to any released version or development version
  • Access documentation for older releases

References

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions