diff --git a/docs/source/conf.py b/docs/source/conf.py index 8f5b308..b01b420 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -107,3 +107,14 @@ # -- Options for autosummary extension --------------------------------------- autosummary_imported_members = True + +# -- Read the Docs Specific Configuration +# 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 +