From ad126123faa944ed4213ccfc15b06491fe56a57d Mon Sep 17 00:00:00 2001 From: schroedtert Date: Fri, 22 Sep 2023 13:08:36 +0200 Subject: [PATCH] Add version switcher --- .github/workflows/docs.yml | 5 +++++ docs/source/conf.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6ca44e364d..224a719ea9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -52,6 +52,11 @@ jobs: python3 -m pip install -r docs/requirements.txt sphinx-build docs/source docs/build -j$(nproc) + - name: Deploy preview + uses: rossjrw/pr-preview-action@v1 + with: + source-dir: ./docs/build + - name: Upload html pages as artifact uses: actions/upload-artifact@v3 with: diff --git a/docs/source/conf.py b/docs/source/conf.py index 34c3a01769..044fc2f5de 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -100,6 +100,11 @@ "type": "url", }, ], + "switcher": { + "json_url": "https://www.jupedsim.org/versions.json", + "version_match": "foo", + }, + "primary_sidebar_end": ["version-switcher"], "show_toc_level": 3, }