Skip to content

Commit 931a449

Browse files
release bump version 1.5.3
1 parent ad54387 commit 931a449

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

doc/changelog.d/747.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add the search button to ``navbar end`` by default

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ theme-name = "ansys_sphinx_theme"
1111
[project]
1212
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
1313
name = "ansys-sphinx-theme"
14-
version = "1.5.2"
14+
version = "1.5.3"
1515
description = "A theme devised by ANSYS, Inc. for Sphinx documentation."
1616
readme = "README.rst"
1717
requires-python = ">=3.10,<4"

src/ansys_sphinx_theme/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,14 @@ def setup_default_html_theme_options(app):
157157
["search-button-field", "version-switcher", "theme-switcher", "navbar-icon-links"],
158158
)
159159

160+
# HACK: Add the search button field to the navbar_end and insert it at the beginning of
161+
# the list. This is a workaround to ensure the search button field is always present
162+
if "navbar_end" in theme_options:
163+
if "search-button-field" not in theme_options["navbar_end"]:
164+
theme_options["navbar_end"].insert(0, "search-button-field")
165+
logging.getLogger(__name__).info(
166+
"The 'search-button-field' has been added to the 'navbar_end' in the theme options."
167+
)
160168
theme_options.setdefault("navbar_persistent", [])
161169
theme_options.setdefault("collapse_navigation", True)
162170
theme_options.setdefault("navigation_with_keys", True)

0 commit comments

Comments
 (0)