From ca0f5eed74b3f8147f6386fed036a4057b43401a Mon Sep 17 00:00:00 2001 From: thmsdt Date: Wed, 14 Aug 2024 12:14:02 +0200 Subject: deprecation of sphinx context injection at build time Issue-ID: DOC-826 Change-Id: I9f7a5d3066b0f36c498b504e7d7541a4ab4621fa Signed-off-by: thmsdt --- docs/conf.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index b07fd2416..c5dd6812c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,22 @@ project = "onap" release = "master" version = "master" +##### +# Deprecation of Sphinx context injection at build time +# see https://about.readthedocs.com/blog/2024/07/addons-by-default/ +import os + +# 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 +# +##### + author = "Open Network Automation Platform" # yamllint disable-line rule:line-length copyright = "ONAP. Licensed under Creative Commons Attribution 4.0 International License" -- cgit 1.2.3-korg