From 536fa8c7955e5c3cb3c36c399919a8da51219f19 Mon Sep 17 00:00:00 2001 From: adamw Date: Fri, 19 Jul 2024 19:17:40 +0200 Subject: [PATCH] RTD migration --- doc/conf.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index d7df20c3ab..ab637f466f 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,6 +20,15 @@ # import sys # sys.path.insert(0, os.path.abspath('.')) +# https://about.readthedocs.com/blog/2024/07/addons-by-default/ +import os + +# Set canonical URL from the Read the Docs Domain +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 # -- General configuration ------------------------------------------------