diff --git a/docs/source/conf.py b/docs/source/conf.py index 3a05d33dc1..5ec97c8b03 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -205,6 +205,14 @@ def parse_schema(d, md=[], depth=0, pre=""): } +# -- Readthedocs specific configuration ------------------------------------------- +# ref: https://about.readthedocs.com/blog/2024/07/addons-by-default/ +# +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True + + # -- Options for linkcheck builder ------------------------------------------- # ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder #