From ed5b0023ff4bcbafe3a0cde461eb7b4feb59d721 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Thu, 4 Apr 2024 02:32:32 +0100 Subject: [PATCH] Fix search and version menu in docs The `html_theme_path` option should not be used any more with sphinx-rtd-theme since it switches off the theme's ability to automatically enable the sphinxcontrib-jquery extension, i.e. jQuery is not loaded in the web pages when building the docs with Sphinx >=6. xref: https://github.com/readthedocs/sphinx_rtd_theme/issues/1434#issuecomment-1472671651 Also replace the deprecated `canonical_url` theme option with Sphinx's `html_baseurl`. xref: https://sphinx-rtd-theme.readthedocs.io/en/stable/configuring.html#confval-canonical_url --- doc/source/conf.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 47730a4f5327..284d7b93242b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -14,8 +14,6 @@ import os import sys -import sphinx_rtd_theme - # Set GALAXY_DOCS_SKIP_VIEW_CODE=1 to skip embedding highlighted source # code into docs. SKIP_VIEW_CODE = os.environ.get("GALAXY_DOCS_SKIP_VIEW_CODE", False) == "1" @@ -161,11 +159,10 @@ def setup(app): "collapse_navigation": False, "display_version": True, "navigation_depth": 2, - "canonical_url": "https://docs.galaxyproject.org/en/master/", } # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +# html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -174,6 +171,8 @@ def setup(app): # A shorter title for the navigation bar. Default is the same as html_title. # html_short_title = None +html_baseurl = "https://docs.galaxyproject.org/en/master/" + # The name of an image file (relative to this directory) to place at the top # of the sidebar. # html_logo = None