Skip to content

Commit c020c67

Browse files
authored
Fix broken search (#999)
* fix check on stopwords: stopwords is a set * Fix search facet options * Remove outdated training options from search field
1 parent 1b88916 commit c020c67

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

docs/_static/searchtools.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function _getBreadcrumbs(item, linkUrl) {
114114

115115
const _displayItem = (item, searchTerms) => {
116116
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
117-
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
117+
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT || "";
118118
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
119119
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
120120
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
@@ -326,7 +326,7 @@ const Search = {
326326
// maybe skip this "word"
327327
// stopwords array is from language_data.js
328328
if (
329-
stopwords.indexOf(queryTermLower) !== -1 ||
329+
stopwords.has(queryTermLower) ||
330330
queryTerm.match(/^\d+$/)
331331
)
332332
return;

docs/_templates/components/search-field.html

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,9 @@
2626
[
2727
['content-editing', 'Content Editing for Plone'],
2828
['mastering-plone', 'Mastering Plone development'],
29-
['volto_customization','Volto customization for JavaScript beginners'],
29+
['volto-customization','Volto customization for JavaScript beginners'],
3030
['customizing-volto-light-theme','Customizing Volto Light Theme'],
31-
['voltohandson','Volto Hands-On (beginner)'],
32-
['voltoaddons','Volto add-ons'],
33-
['effective-volto','Effective Volto (advanced)'],
34-
['testing','Testing'],
35-
['theming','Plone 6 Classic UI Theming'],
3631
['plone-deployment','Deployment'],
37-
['workflow','Workflow'],
3832
['migrations','Migration best practice'],
3933
['contributing', 'Contributing to Plone'],
4034
] %}

0 commit comments

Comments
 (0)