diff --git a/docs/conf.py b/docs/conf.py index 7d606c52..1ad1ba6d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -33,6 +33,16 @@ # # needs_sphinx = '1.0' +# https://about.readthedocs.com/blog/2024/07/addons-by-default/ +# 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 + # Do not warn on external images. suppress_warnings = ["image.nonlocal_uri"]