docs: readthedocs deprecation fix (#24321)

https://about.readthedocs.com/blog/2024/07/addons-by-default/#how-does-it-affect-my-projects

we use build.command so we're already using addons, so I think this is
it
This commit is contained in:
Erick Friis 2024-07-16 13:32:51 -07:00 committed by GitHub
parent ef07308c30
commit dd7938ace8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -178,3 +178,10 @@ autosummary_generate = True
html_copy_source = False
html_show_sourcelink = False
# 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