From 242541212e7fa1e70dd803e8b7d6bfb5cf663105 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Wed, 17 Jul 2024 12:16:12 +0100 Subject: [PATCH] RTD custom domain changes RTD is going to stop injecting config on the fly. This affects custom domains: https://about.readthedocs.com/blog/2024/07/addons-by-default/ --- docs/source/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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 #