summaryrefslogtreecommitdiff
path: root/doc/developer/conf.py
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-10-30 14:15:36 +0200
committerDonatas Abraitis <donatas@opensourcerouting.org>2024-10-30 14:15:36 +0200
commitef9f698e04211281c803a67f3480835f62aae3ee (patch)
tree708e983de03d4beaf57c07d5a7c4b0cb3ab86f24 /doc/developer/conf.py
parent56495a88dfc4959331e9baf4c442ea665b2fc776 (diff)
doc: Create html_context before setting READTHEDOCS
Traceback (most recent call last): File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/envs/latest/lib/python3.11/site-packages/sphinx/config.py", line 529, in eval_config_file exec(code, namespace) # NoQA: S102 ^^^^^^^^^^^^^^^^^^^^^ File "/home/docs/checkouts/readthedocs.org/user_builds/frrouting/checkouts/latest/doc/user/conf.py", line 77, in <module> html_context["READTHEDOCS"] = True ^^^^^^^^^^^^ NameError: name 'html_context' is not defined Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'doc/developer/conf.py')
-rw-r--r--doc/developer/conf.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/developer/conf.py b/doc/developer/conf.py
index 634f4aa804..a5b5148140 100644
--- a/doc/developer/conf.py
+++ b/doc/developer/conf.py
@@ -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