diff --git a/doc/source/conf.py b/doc/source/conf.py index 1bfee14a2..334b52e6a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -187,6 +187,14 @@ def get_igraph_version(): # Output file base name for HTML help builder. htmlhelp_basename = "igraphdoc" +# Integration with Read the Docs since RTD is not manipulating the Sphinx +# config files on its own any more. +# This is according to: +# https://about.readthedocs.com/blog/2024/07/addons-by-default/ +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") +html_context = {} +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True # -- Options for pydoctor ------------------------------------------------------