From 82497e82f21d5a2cd6652dcce929160c905f745d Mon Sep 17 00:00:00 2001 From: jakirkham Date: Wed, 25 Sep 2024 19:59:35 -0700 Subject: [PATCH] Handle already defined `html_context` --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index f8059226..d5fa39ef 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -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