From eaaff100a12e888b5904a5709e20f00c522c44d2 Mon Sep 17 00:00:00 2001 From: Klaus Wakonig Date: Fri, 23 Dec 2022 15:54:39 +0100 Subject: [PATCH] docs: added version switcher --- docs/source/_static/switcher.json | 12 ++++++++++++ docs/source/conf.py | 6 ++++++ docs/source/index.rst | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 docs/source/_static/switcher.json diff --git a/docs/source/_static/switcher.json b/docs/source/_static/switcher.json new file mode 100644 index 00000000..661867b4 --- /dev/null +++ b/docs/source/_static/switcher.json @@ -0,0 +1,12 @@ +[ + { + "name": "production", + "version": "0.1", + "url": "https://beamline-experiment-control.readthedocs.io/en/production/index.html", + }, + { + "name": "master", + "version": "0.1", + "url": "https://beamline-experiment-control.readthedocs.io/en/latest/index.html", + }, +] diff --git a/docs/source/conf.py b/docs/source/conf.py index d902a512..89445235 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -46,3 +46,9 @@ language = "Python" # html_theme = 'alabaster' html_theme = "pydata_sphinx_theme" html_static_path = ["_static"] +html_theme_options = { + "switcher": { + "json_url": "https://beamline-experiment-control.readthedocs.io/en/latest/_static/switcher.json", + }, + "navbar_start": ["navbar-logo", "version-switcher"], +} diff --git a/docs/source/index.rst b/docs/source/index.rst index afeddf70..41ac1ba8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -3,7 +3,7 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to BEC's documentation! +Beamline Experiment Control ===============================