Skip to content

Commit 2425412

Browse files
authored
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/
1 parent fd6fff1 commit 2425412

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/source/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,14 @@ def parse_schema(d, md=[], depth=0, pre=""):
205205
}
206206

207207

208+
# -- Readthedocs specific configuration -------------------------------------------
209+
# ref: https://about.readthedocs.com/blog/2024/07/addons-by-default/
210+
#
211+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
212+
if os.environ.get("READTHEDOCS", "") == "True":
213+
html_context["READTHEDOCS"] = True
214+
215+
208216
# -- Options for linkcheck builder -------------------------------------------
209217
# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder
210218
#

0 commit comments

Comments
 (0)