Skip to content

Commit

Permalink
Fix search and version menu in docs
Browse files Browse the repository at this point in the history
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: readthedocs/sphinx_rtd_theme#1434 (comment)

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
  • Loading branch information
nsoranzo committed Apr 4, 2024
1 parent 4827ff8 commit ed5b002
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
# "<project> v<release> documentation".
Expand All @@ -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
Expand Down

0 comments on commit ed5b002

Please sign in to comment.