diff --git a/doc/conf.py b/doc/conf.py index ab637f466f..5edd0d6c0b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -23,11 +23,13 @@ # https://about.readthedocs.com/blog/2024/07/addons-by-default/ import os -# Set canonical URL from the Read the Docs Domain +# 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": + if "html_context" not in globals(): + html_context = {} html_context["READTHEDOCS"] = True # -- General configuration ------------------------------------------------ diff --git a/generated-doc/out/conf.py b/generated-doc/out/conf.py index ab637f466f..5edd0d6c0b 100644 --- a/generated-doc/out/conf.py +++ b/generated-doc/out/conf.py @@ -23,11 +23,13 @@ # https://about.readthedocs.com/blog/2024/07/addons-by-default/ import os -# Set canonical URL from the Read the Docs Domain +# 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": + if "html_context" not in globals(): + html_context = {} html_context["READTHEDOCS"] = True # -- General configuration ------------------------------------------------