From ba190b2331f0470b9ef31e79bf31991da20615fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Thu, 5 Mar 2026 19:06:48 +0100 Subject: [PATCH 1/2] Fix summary of search result for matches in title --- docs/_static/searchtools.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js index 8d6a3c36b..20c54504e 100644 --- a/docs/_static/searchtools.js +++ b/docs/_static/searchtools.js @@ -253,20 +253,20 @@ const Search = { htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); } if (anchor) { - const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + const anchorContent = htmlElement.querySelector(`.bd-article ${anchor}`); if (anchorContent) return anchorContent.textContent; console.warn( - `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '.bd-article ${anchor}'. Check your theme or template.` ); } // if anchor not specified or not found, fall back to main content - const docContent = htmlElement.querySelector('[role="main"]'); + const docContent = htmlElement.querySelector('.bd-article'); if (docContent) return docContent.textContent; console.warn( - "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + "Content block not found. Sphinx search tries to obtain it via DOM query '.bd-article'. Check your theme or template." ); return ""; }, From d4996446e497f532010337f9566011b456c893f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Thu, 5 Mar 2026 19:07:05 +0100 Subject: [PATCH 2/2] Clean up search options --- docs/_templates/components/search-field.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/_templates/components/search-field.html b/docs/_templates/components/search-field.html index e2038956b..87b7a1fb4 100644 --- a/docs/_templates/components/search-field.html +++ b/docs/_templates/components/search-field.html @@ -28,19 +28,18 @@ ['backend', 'Backend'], ['classic-ui', 'Classic UI'], ['conceptual-guides', 'Conceptual Guides'], - ['contributing', 'Contributing'], + ['contributing', 'Contributing to Plone'], ['deployment', 'Deployment'], ['developer-guide', 'Developer Guide'], - ['i18n-l10n', 'i18n/l10n'], + ['glossary', 'Glossary'], + ['i18n-l10n', 'Internationalization and Localization'], ['install', 'Install'], ['overview', 'Overview'], ['reference-guide', 'Reference Guide'], - ['training', 'Training'], ['upgrade', 'Upgrade'], - ['user-guide', 'User Guide'], ['plone.restapi', 'Plone REST API'], ['plone.api', 'Plone API'], - ['volto', 'Volto'], + ['volto', 'Volto UI'], ] %} {% endfor %}