summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py')
-rw-r--r--meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py b/meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py
index e9cab63359..d8b558fa24 100644
--- a/meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py
+++ b/meta-arm/meta-arm-bsp/documentation/corstone1000/conf.py
@@ -10,15 +10,19 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
-# import os
-# import sys
# sys.path.insert(0, os.path.abspath('.'))
+import os
+import sys
+
+# Append the documentation directory to the path, so we can import variables
+sys.path.append(os.path.dirname(__file__))
+
# -- Project information -----------------------------------------------------
project = 'corstone1000'
-copyright = '2020-2022, Arm Limited'
+copyright = '2020-2024, Arm Limited'
author = 'Arm Limited'
@@ -28,6 +32,7 @@ author = 'Arm Limited'
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
+ 'sphinx_rtd_theme',
]
# Add any paths that contain templates here, relative to this directory.
@@ -46,6 +51,16 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'docs/infra']
#
html_theme = 'sphinx_rtd_theme'
+# Define the canonical URL if you are using a custom domain on Read the Docs
+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":
+ if "html_context" not in globals():
+ html_context = {}
+ html_context["READTHEDOCS"] = True
+
+
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".