Skip to content

Commit

Permalink
docs: add version switcher (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
FloLimebit authored Jan 29, 2025
1 parent 1985e53 commit 6ad9abf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
"""Sphinx configuration."""

import importlib.metadata
import sys
from datetime import date
from pathlib import Path

from myst_parser import __version__
from sphinx.application import Sphinx

# Add parent directory to sys.path for autodoc
sys.path.insert(0, str(Path(__file__).parent.parent))

# Project information
project = "medmodels"
project = "MedModels"
author = "Limebit GmbH"
copyright = f"{date.today().year}, {author}"
version = __version__
version = importlib.metadata.version(project)

# General configuration
extensions = [
Expand Down Expand Up @@ -152,6 +152,11 @@
],
"primary_sidebar_end": ["indices.html"],
"secondary_sidebar_items": ["page-toc"],
"switcher": {
"json_url": "https://www.medmodels.de/docs/switcher.json",
"version_match": version,
},
"show_version_warning_banner": True,
}

html_context = {
Expand Down

0 comments on commit 6ad9abf

Please sign in to comment.