From faff913f620e89f7469e667bad6601a2627f511e Mon Sep 17 00:00:00 2001 From: Adina Wagner Date: Wed, 17 Jul 2024 07:48:03 +0200 Subject: [PATCH] add rdt configuration recommendation prior to upcoming deprecations see https://about.readthedocs.com/blog/2024/07/addons-by-default --- docs/conf.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index ae80e0d4a..53b853f57 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -265,7 +265,17 @@ trim_footnote_reference_space = True # -- Options for HTML output --------------------------------------------------- -html_baseurl = 'https://handbook.datalad.org/' +#html_baseurl = 'https://handbook.datalad.org/' +# see https://about.readthedocs.com/blog/2024/07/addons-by-default/ for the +# reasoning behind the following: +import os +html_context = {} +# Set canonical URL from the Read the Docs Domain +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +print("########### this is the baseurl", html_baseurl) +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes.