Skip to content

Commit

Permalink
Handle already defined html_context
Browse files Browse the repository at this point in the history
  • Loading branch information
jakirkham authored Sep 26, 2024
1 parent 5ac8da6 commit 82497e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,10 @@
# Set canonical URL from the Read the Docs Domain
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

html_context = {}
# 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

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down

0 comments on commit 82497e8

Please sign in to comment.