doc: update sphinx configs for RTD changes

Read The Docs made some changes that require us to add some
configuration in our build config files.

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
This commit is contained in:
Quentin Young 2024-08-21 19:38:09 -04:00
parent e2d63567ec
commit 95d9bf12e3
2 changed files with 17 additions and 0 deletions

View File

@ -66,6 +66,13 @@ version = u"?.?"
# The full version, including alpha/beta/rc tags.
release = u"?.?-?"
# 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
# -----------------------------------------------------------------------------
# Extract values from codebase for substitution into docs.

View File

@ -65,6 +65,16 @@ version = u"?.?"
# The full version, including alpha/beta/rc tags.
release = u"?.?-?"
# RTD configuration
# 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
# -----------------------------------------------------------------------------
# Extract values from codebase for substitution into docs.