From 58a7a1488728a67e06bbc5b6e6d8af834268cf19 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 7 Oct 2024 16:03:40 +0200 Subject: [PATCH 1/2] Doc: use 'version_selector' instead of 'display_version' which is deprecated by sphinx-rtd-theme 3.0.0 --- .github/workflows/doc_checks.yml | 5 +++++ docs/source/conf.py | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/doc_checks.yml b/.github/workflows/doc_checks.yml index 704846b814..4d583db2f2 100644 --- a/.github/workflows/doc_checks.yml +++ b/.github/workflows/doc_checks.yml @@ -26,6 +26,11 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - name: Update sphinx-rtd-theme + shell: bash -l {0} + run: | + pip install -U "sphinx-rtd-theme>=3.0.0" + - name: Print versions shell: bash -l {0} run: | diff --git a/docs/source/conf.py b/docs/source/conf.py index bc0cf80801..bcc60bc180 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,8 +9,6 @@ import sys from datetime import date -import sphinx_rtd_theme - sys.path.insert(0, os.path.abspath(".")) sys.path.insert(0, os.path.abspath("_extensions")) @@ -119,7 +117,7 @@ html_theme_options = { "canonical_url": "https://proj.org", "logo_only": True, - "display_version": True, + "version_selector": True, "prev_next_buttons_location": "both", "style_external_links": False, "style_nav_header_background": "#353130", @@ -131,9 +129,6 @@ "titles_only": False, } -# Add any paths that contain custom themes here, relative to this directory -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - # Display "Edit on GitHub" link on each page # https://docs.readthedocs.io/en/stable/guides/edit-source-links-sphinx.html html_context = { From eb25d7154c9d35124ff0d2d24d7818a1a5620e32 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 7 Oct 2024 16:04:00 +0200 Subject: [PATCH 2/2] Doc: conf.py: use correct 'html_css_files' property --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index bcc60bc180..5e8f52e8a2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -149,7 +149,7 @@ # Add any paths that contain custom static files (such as style sheets) html_static_path = ["_static"] -htm_css_files = [ +html_css_files = [ "theme_overrides.css", # override wide tables in RTD theme ]