diff --git a/docs/conf.py b/docs/conf.py index f4c215b..ccbee68 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,7 @@ # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +import os # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information @@ -43,6 +44,15 @@ "footer_end": ["footer-links"], } +html_context = {} + +# Readthedocs specific configuration +# https://about.readthedocs.com/blog/2024/07/addons-by-default/ +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True + + # -- Link checker configuration linkcheck_ignore = [