Skip to content

Commit ba52b8b

Browse files
Hotfix for deprecation of Sphinx context injection
Additional information are at: https://about.readthedocs.com/blog/2024/07/addons-by-default/
1 parent a39e901 commit ba52b8b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/source/conf.py

+9
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
# import sys
1919
# sys.path.insert(0, os.path.abspath('.'))
2020

21+
# -- Deprecation of Sphinx context injection ---------------------------------
22+
import os
23+
24+
# Set canonical URL from the Read the Docs Domain
25+
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
26+
27+
# Tell Jinja2 templates the build is running on Read the Docs
28+
if os.environ.get("READTHEDOCS", "") == "True":
29+
html_context["READTHEDOCS"] = True
2130

2231
# -- Project information -----------------------------------------------------
2332

0 commit comments

Comments
 (0)