From daef3cb70e6a7f8fd879b35e3d753d4bdc0d75a4 Mon Sep 17 00:00:00 2001 From: PennyWieser Date: Sun, 20 Oct 2024 21:00:31 -0700 Subject: [PATCH] after reading blog --- docs/conf.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8528b47..b0531fc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,12 +15,11 @@ import os import sys import sphinx_rtd_theme -#sys.path.insert(0, os.path.abspath('..')) - sys.path.insert(0, os.path.abspath('../src')) + # -- Project information ----------------------------------------------------- project = 'Thermobar' @@ -36,7 +35,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('..')) + # -- General configuration --------------------------------------------------- @@ -236,9 +235,11 @@ 'numpy': ('https://docs.scipy.org/doc/numpy', None), } + + html_context = { - 'READTHEDOCS': os.environ.get('READTHEDOCS', False), - 'github_version': 'main', - 'current_version': release, # Set the correct version + 'READTHEDOCS': os.environ.get('READTHEDOCS', '') == 'True', + 'github_version': os.environ.get('READTHEDOCS_VERSION', 'main'), # Pull correct version info + 'current_version': release, # Use release variable defined earlier }