From 9e6c28999ebc578da6484bfc096a9e901bfd08b6 Mon Sep 17 00:00:00 2001 From: Chris Weikl Date: Wed, 17 Jul 2024 09:44:21 +0200 Subject: [PATCH] Update conf.py changes according to announcement of read-the-docs of deprecating build-time-changes --- source/conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/conf.py b/source/conf.py index 32064a3d..1e103692 100755 --- a/source/conf.py +++ b/source/conf.py @@ -21,6 +21,16 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. sys.path.insert(0, os.path.abspath('.')) +# ---- inserted according to read-the-docs announcement on deprecating build time changes --- +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True + +# ---- end --- + # > Sphinx v1.6.1 def setup(app): # app.add_stylesheet("theme_overrides.css")