Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: Patch doc/conf.py to work with latest ReadTheDocs #3691

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -132,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"]

Expand Down