stylelint.io icon indicating copy to clipboard operation
stylelint.io copied to clipboard

Search Results: Display 'No Results Found' Message Instead of 'undefined'

Open damiansire opened this issue 1 year ago • 3 comments

Describe the documentation issue

When you search for something and it finds nothing in the documentation, show the message: " Try searching for: undefined "

image

What solution would you like to see?

Display 'No Results Found' or something other Message Instead of 'undefined'

damiansire avatar Aug 29 '24 06:08 damiansire

@damiansire Thanks for the report. I've transferred this issue to the website repository.

ybiquitous avatar Aug 29 '24 07:08 ybiquitous

Here is the current algolia config: https://github.com/stylelint/stylelint.io/blob/eaa0978250a275c6d4ac71e137338bf7c016a65c/docusaurus.config.js#L77-L81

ybiquitous avatar Aug 29 '24 07:08 ybiquitous

I've updated the Algolia index configuration according to the following docs:

  • https://docsearch.algolia.com/docs/templates/#docusaurus-v2--v3-template
  • https://docusaurus.io/docs/search#algolia-index-configuration

I added lvl0 to the index config:

image

Then, the suggestions increased, but undefined still remains: image

However, the same issue happens also in https://docusaurus.io, so I guess it's a problem with a UI component of Docusaurus or Algolia. 🤔

image

ybiquitous avatar Aug 29 '24 09:08 ybiquitous

Looks like it was fixed upstream:

Image

jeddy3 avatar Dec 23 '24 23:12 jeddy3