[PATCH 1/1] doc: define html_context in conf.py

The dictionary html_context is not passed into conf.py but must be created there. See https://dev.readthedocs.io/en/latest/design/theme-context.html#customizing-t...
Fixes: df86796028df ("doc: enable ReadTheDocs addon management") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- doc/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/doc/conf.py b/doc/conf.py index e79134cc3d7..ced3a6723fc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,7 +26,9 @@ html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
# Tell Jinja2 templates the build is running on Read the Docs if os.environ.get("READTHEDOCS", "") == "True": - html_context["READTHEDOCS"] = True + html_context = { + 'READTHEDOCS' : True, + }
# If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the

On Fri, 19 Jul 2024 at 22:23, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
The dictionary html_context is not passed into conf.py but must be created there. See https://dev.readthedocs.io/en/latest/design/theme-context.html#customizing-t...
Fixes: df86796028df ("doc: enable ReadTheDocs addon management") Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
doc/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org
diff --git a/doc/conf.py b/doc/conf.py index e79134cc3d7..ced3a6723fc 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,7 +26,9 @@ html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")
# Tell Jinja2 templates the build is running on Read the Docs if os.environ.get("READTHEDOCS", "") == "True":
- html_context["READTHEDOCS"] = True
- html_context = {
'READTHEDOCS' : True,
- }
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
2.45.2

On Fri, 19 Jul 2024 23:23:26 +0200, Heinrich Schuchardt wrote:
The dictionary html_context is not passed into conf.py but must be created there. See https://dev.readthedocs.io/en/latest/design/theme-context.html#customizing-t...
Applied to u-boot/master, thanks!
participants (3)
-
Heinrich Schuchardt
-
Simon Glass
-
Tom Rini