diff --git a/doc/sphinx/_static/doc-versions.json b/doc/sphinx/_static/doc-versions.json new file mode 100644 index 000000000..9323e9499 --- /dev/null +++ b/doc/sphinx/_static/doc-versions.json @@ -0,0 +1,35 @@ +[ + { + "name": "3.0 (dev)", + "version": "3.0", + "url": "/documentation/dev/sphinx/html/" + }, + { + "version": "2.6.0 (stable)", + "url": "/documentation/docs-2.6/sphinx/html/" + }, + { + "version": "2.5.1", + "url": "/documentation/docs-2.5/sphinx/html/" + }, + { + "version": "2.4.0", + "url": "/documentation/docs-2.4/sphinx/html/" + }, + { + "version": "2.3.0", + "url": "/documentation/docs-2.3/sphinx/html/" + }, + { + "version": "2.2.1", + "url": "/documentation/docs-2.2/sphinx/html/" + }, + { + "version": "2.1.2", + "url": "/documentation/docs-2.1/sphinx/html/" + }, + { + "version": "2.0.2", + "url": "/documentation/docs-2.0/sphinx/html/" + } +] diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py index 9eda9a186..57cdf6aef 100644 --- a/doc/sphinx/conf.py +++ b/doc/sphinx/conf.py @@ -176,11 +176,26 @@ html_theme = 'pydata_sphinx_theme' html_theme_options = { "show_toc_level": 2, "navbar_center": ["cantera-org-links"], + "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], "logo": { "link": "/index.html", "alt_text": "Cantera", }, "primary_sidebar_end": ["numfocus"], + "switcher": { + "json_url": "/documentation/dev/sphinx/html/_static/doc-versions.json", + # "json_url": "https://cantera.org/doc-versions.json", + "version_match": version, + }, + "check_switcher": False, + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/Cantera/cantera", + "icon": "fa-brands fa-square-github", + "type": "fontawesome", + } + ], } # Add any paths that contain custom themes here, relative to this directory.