From febd5d38b4b7ba803971fd3955ac3805a523c294 Mon Sep 17 00:00:00 2001 From: Matthias Geier Date: Sun, 21 May 2023 16:32:31 +0200 Subject: [PATCH] Support for the new searchfield.html template This has been added in https://github.com/sphinx-doc/sphinx/pull/11045. --- doc/configuration.rst | 5 +++-- doc/showcase/different-sidebar.rst | 2 +- src/insipid_sphinx_theme/insipid/layout.html | 2 +- src/insipid_sphinx_theme/insipid/search-button.html | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 4193228..2fea946 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -91,7 +91,7 @@ See below for `default values`_. .. note:: This is only shown if :confval:`html_sidebars` - does *not* contain ``'searchbox.html'``. + does *not* contain ``'searchbox.html'`` or ``'searchfield.html'``. :gh-template:`fullscreen-button.html` A button to switch to fullscreen mode (and back again). @@ -353,7 +353,8 @@ which are relevant for the ``insipid`` theme. :file:`globaltoc.html`, :file:`localtoc.html`, :file:`relations.html`, - :file:`searchbox.html` and + :file:`searchbox.html`, + :file:`searchfield.html` and :file:`sourcelink.html`. You can also select templates from the ``insipid`` theme: diff --git a/doc/showcase/different-sidebar.rst b/doc/showcase/different-sidebar.rst index 4ab12ee..b6d7f67 100644 --- a/doc/showcase/different-sidebar.rst +++ b/doc/showcase/different-sidebar.rst @@ -26,6 +26,6 @@ Search Box If you don't like the search button in the topbar, you can also put a search field into the sidebar -by selecting the template ``searchbox.html``. +by selecting the template ``searchbox.html`` or ``searchfield.html``. Like the search button, this is only available when JavaScript is enabled. diff --git a/src/insipid_sphinx_theme/insipid/layout.html b/src/insipid_sphinx_theme/insipid/layout.html index 5a017aa..8ae3dc6 100644 --- a/src/insipid_sphinx_theme/insipid/layout.html +++ b/src/insipid_sphinx_theme/insipid/layout.html @@ -143,7 +143,7 @@ {%- endif %} -{%- if pagename != "search" and 'searchbox.html' not in sidebars %} +{%- if pagename != "search" and 'searchbox.html' not in sidebars and 'searchfield.html' not in sidebars %}