From d6e88a80ffb8743dc821d5ea5a4821937ecd5351 Mon Sep 17 00:00:00 2001 From: Bryon Tjanaka Date: Tue, 16 Jul 2024 16:39:00 -0700 Subject: [PATCH 1/3] Fix documentation conf for readthedocs deprecations --- docs/conf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index e1d9b6570..8e6d46fb2 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -29,6 +29,13 @@ sys.path.insert(0, os.path.abspath("..")) # Detect ribs. sys.path.append(os.path.abspath("./_ext")) # Detect extensions. +# 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 + DEV_MODE = os.environ.get("DOCS_MODE", "regular") == "dev" READTHEDOCS_VERSION = os.environ.get("READTHEDOCS_VERSION", "stable") READTHEDOCS_LANGUAGE = os.environ.get("READTHEDOCS_LANGUAGE", "en") From b1f38a13e5f1f5bf10d2f7f2e9424b316d9f0e77 Mon Sep 17 00:00:00 2001 From: Bryon Tjanaka Date: Tue, 16 Jul 2024 16:43:51 -0700 Subject: [PATCH 2/3] history --- HISTORY.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HISTORY.md b/HISTORY.md index 4d67ba325..c74fb7b1f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -20,6 +20,7 @@ #### Documentation +- Fix documentation conf for readthedocs deprecations ({pr}`485`) - Add novelty search with CMA-ES to sphere example ({pr}`478`, {pr}`482`) #### Improvements From 8452e69e91270466f2e7e7d94982e0ae820fc9e6 Mon Sep 17 00:00:00 2001 From: Bryon Tjanaka Date: Tue, 16 Jul 2024 17:25:42 -0700 Subject: [PATCH 3/3] Fix html_context error --- docs/conf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 8e6d46fb2..3a1fbcf9f 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,10 +32,6 @@ # 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 - DEV_MODE = os.environ.get("DOCS_MODE", "regular") == "dev" READTHEDOCS_VERSION = os.environ.get("READTHEDOCS_VERSION", "stable") READTHEDOCS_LANGUAGE = os.environ.get("READTHEDOCS_LANGUAGE", "en") @@ -143,6 +139,10 @@ html_title = (f"pyribs (stable - v{version})" if READTHEDOCS_VERSION == "stable" else f"pyribs ({READTHEDOCS_VERSION})") +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + html_context["READTHEDOCS"] = True + # material theme options (see theme.conf for more information) html_theme_options = { "nav_title": "pyribs",