diff --git a/docs/conf.py b/docs/conf.py index 152e7beccb9f6683dd21449480de1f415faf4859..c95fbf85d9185e812a720babbb82dc0a1c47be5c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information +import os from datetime import datetime import pyvista @@ -55,6 +56,14 @@ html_static_path = ["_static"] html_css_files = ["ogstools.css"] html_context = {"default_mode": "light"} +# Set up the version switcher. The versions.json is stored in the doc repo. +if os.environ.get("CI_MERGE_REQUEST_IID", False): + switcher_version = f"!{os.environ['CI_MERGE_REQUEST_IID']}" +elif ".dev" in version: + switcher_version = "dev" +else: + switcher_version = f"{version}" + html_theme_options = { "logo": { # "text": "OGSTools", @@ -71,6 +80,12 @@ html_theme_options = { } ], "navigation_with_keys": True, + "switcher": { + "version_match": switcher_version, + "json_url": "https://ogstools.opengeosys.org/_static/versions.json", + }, + "navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"], + "show_version_warning_banner": True, } nitpick_ignore_regex = [("py:class", r".*")] diff --git a/docs/releases/ogstools-0.1.1.md b/docs/releases/ogstools-0.1.1.md index 26e5642cdea1b71e008c2de94cb29a7fa86e7a9b..fac8f7c5924cab6b1417aa83a437ada7c2f0a490 100644 --- a/docs/releases/ogstools-0.1.1.md +++ b/docs/releases/ogstools-0.1.1.md @@ -1,8 +1,10 @@ # OGSTools 0.1.1 Release Notes -The second release of the `ogstools`-package brings lots of new library functionality for e.g. plotting and mesh generation as well as a new tool for converting FEFLOW meshes! A full-featured prebuilt [Docker image](../user-guide/docker.md) is provided. - ## Library [`studies`](../user-guide/studies.md) a new package that provides utility functions to compose studies from multiple simulation runs. Now it contains functions to perform convergence studies. + +## Infrastructure & Development + +Web documentation for releases is now available on [ogstools.opengeosys.org](https://ogstools.opengeosys.org). Documentation for previous releases will be available in the future and can be selected with a version dropdown in the navigation bar.