Merge pull request #17310 from opensourcerouting/fix/doc_build

doc: Create html_context before setting READTHEDOCS
This commit is contained in:
Jafar Al-Gharaibeh 2024-10-30 13:13:34 -05:00 committed by GitHub
commit 7c1034087e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -71,6 +71,7 @@ release = "?.?-?"
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
# Tell Jinja2 templates the build is running on Read the Docs
html_context = {}
if os.environ.get("READTHEDOCS", "") == "True":
html_context["READTHEDOCS"] = True

View File

@ -73,11 +73,11 @@ release = "?.?-?"
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
# Tell Jinja2 templates the build is running on Read the Docs
html_context = {}
if os.environ.get("READTHEDOCS", "") == "True":
html_context["READTHEDOCS"] = True
# -----------------------------------------------------------------------------
# Extract values from codebase for substitution into docs.
# -----------------------------------------------------------------------------