From be9693cd5b04dcaf87087812ad149c8203ebc146 Mon Sep 17 00:00:00 2001 From: Saaketh Narayan Date: Mon, 5 Aug 2024 11:12:45 -0700 Subject: [PATCH] yo (#746) Co-authored-by: Mihir Patel --- docs/source/conf.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0a4e98872..b4e8ca9ce 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -233,6 +233,18 @@ def _get_commit_sha() -> str: python_use_unqualified_type_names = True autodoc_typehints = 'none' +# Code below is required due to Read the Docs enabling Addons by default. +# More info here: 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 + def skip_redundant_namedtuple_attributes( app: sphinx.application.Sphinx,