From 90ac8152b40981ab0bc6cfe61997bc10685c5d80 Mon Sep 17 00:00:00 2001 From: Rebecca Bilbro Date: Fri, 27 Sep 2024 12:58:40 -0400 Subject: [PATCH] update sphinx configuration for read the docs --- docs/conf.py | 11 ++++++++++- docs/requirements.txt | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 5993dd9b4..8e0b9b717 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -101,7 +101,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -191,6 +191,15 @@ ## Options for HTML output ########################################################################## +# Define the canonical URL for 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 + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # diff --git a/docs/requirements.txt b/docs/requirements.txt index 2fa82d020..14ded6cb2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,7 +7,7 @@ cycler>=0.10.0 umap-learn>=0.5.1 # Documentation Dependencies -Sphinx>=3.4 -sphinx-rtd-theme>=0.5.1 +Sphinx==8.0.2 +sphinx-rtd-theme==3.0.0rc1 numpydoc>=1.1 pandas>=1.0.4