Skip to content

Commit 635ac02

Browse files
committed
DOC: Patch doc/conf.py to work with latest ReadTheDocs
1 parent ae12343 commit 635ac02

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/conf.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919
import nipype
2020
import subprocess as sp
2121

22+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
23+
24+
# Tell Jinja2 templates the build is running on Read the Docs
25+
if os.environ.get("READTHEDOCS", "") == "True":
26+
if "html_context" not in globals():
27+
html_context = {}
28+
html_context["READTHEDOCS"] = True
29+
2230
# Disable etelemetry during doc builds
2331
os.environ["NIPYPE_NO_ET"] = "1"
2432

0 commit comments

Comments
 (0)