feat(aio): improve search results functionality
* Ensure that all indexed documents are displayed in the search results. (Previously the guide documents were not appearing because we only showed results that had a `name` property, rather than a `name` or `title`.) * Group the results by their containing folder (e.g. api, guide, tutorial, etc). * Hide the results when the user hits the ESC key. * Hide the results when the user clicks on a search result Closes #14852
This commit is contained in:

committed by
Chuck Jazdzewski

parent
8850098ea4
commit
6497633529
@ -112,7 +112,7 @@ module.exports = function generateKeywordsProcessor(log, readFilesProcessor) {
|
||||
var searchData =
|
||||
filteredDocs.filter(function(page) { return page.searchTerms; }).map(function(page) {
|
||||
return Object.assign(
|
||||
{path: page.path, title: page.name, type: page.docType}, page.searchTerms);
|
||||
{path: page.path, title: page.name || page.title, type: page.docType}, page.searchTerms);
|
||||
});
|
||||
|
||||
docs.push({
|
||||
|
Reference in New Issue
Block a user