mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-20 20:04:46 +00:00
doc: enable ReadTheDocs addon management
Up to now ReadTheDocs has been injecting code when building on their platform. This includes for instance improvements for the search function. To maintain the current output ReadTheDocs requires setting html_baseurl and html_context in conf.py. See: https://about.readthedocs.com/blog/2024/07/addons-by-default/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
ff47fddf72
commit
df86796028
1 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,12 @@ from subprocess import check_output
|
||||||
# Get Sphinx version
|
# Get Sphinx version
|
||||||
major, minor, patch = sphinx.version_info[:3]
|
major, minor, patch = sphinx.version_info[:3]
|
||||||
|
|
||||||
|
# Set canonical URL from the Read the Docs Domain
|
||||||
|
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
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# 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
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
|
Loading…
Add table
Reference in a new issue