From e0a5033ef05bcebff67a3bd994f6b7a395c1b4dd Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 3 Sep 2024 14:58:13 -0400 Subject: [PATCH] Update configuration for ReadTheDocs --- conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/conf.py b/conf.py index 35e0d28..d3fed19 100644 --- a/conf.py +++ b/conf.py @@ -13,6 +13,17 @@ import sys, os +### DPVC -- from https://about.readthedocs.com/blog/2024/07/addons-by-default/ +# 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 +### /DPVC + # 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 # documentation root, use os.path.abspath to make it absolute, like shown here.