From 635ac029bd7c1abd9d7d5815e4a31db32e7d644c Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 7 Oct 2024 14:04:58 -0400 Subject: [PATCH 1/2] DOC: Patch doc/conf.py to work with latest ReadTheDocs --- doc/conf.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 043d477612..6e5747186e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -19,6 +19,14 @@ import nipype import subprocess as sp +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 + # Disable etelemetry during doc builds os.environ["NIPYPE_NO_ET"] = "1" From 86e10d341a4e17159becfa3fb86ae6d49655f214 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 7 Oct 2024 14:08:22 -0400 Subject: [PATCH 2/2] doc: Remove old RTD patch --- doc/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 6e5747186e..128002b1ed 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -140,10 +140,6 @@ ] -on_rtd = os.environ.get("READTHEDOCS") == "True" -if on_rtd: - extensions.append("readthedocs_ext.readthedocs") - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"]