website-v2 icon indicating copy to clipboard operation
website-v2 copied to clipboard

Search feature on documentation

Open Hans5958 opened this issue 3 years ago • 5 comments
trafficstars

This is a dream of mine, but I haven't got time or skill to do it, so if anyone can implement a search feature on the docs, I will appreciate it.

Preferably without Algolia or other third-party services

Some resources ideas to start with (go ahead if you have other ideas):

  • https://fusejs.io/
  • https://scratchaddons.com/index.xml
  • https://scratchaddons.com/en/sitemap.xml
  • https://lunrjs.com/
  • https://www.npmjs.com/package/hugo-lunr
  • https://gohugo.io/tools/search/

Hans5958 avatar Mar 05 '22 17:03 Hans5958

fuse is actually horrible tbh, the results are not accurate at all

see, this search returns nothing because i didn't use double quotes image

cobaltt7 avatar Mar 05 '22 22:03 cobaltt7

see, this search returns nothing because i didn't use double quotes

A single quote means "include-match" according to the documentation, but I don't know how that's different from just typing the word.

A more serious problem is that even if extended search is enabled (without it, you have to enter the words in the same order as they appear in the result), you can only search individual fields. image image image

For documentation search, that would mean "joining volunteer localization" would return no results because "joining" only appears in the title and "volunteer" only appears in the page content.

mxmou avatar Mar 06 '22 07:03 mxmou

Yeah, it was just my random idea based on the current implementation on Scratch Addons. If anyone knows better libraries then go ahead.

Hans5958 avatar Mar 06 '22 07:03 Hans5958

I forgot these existed:

  • https://lunrjs.com/
  • https://www.npmjs.com/package/hugo-lunr
  • https://gohugo.io/tools/search/

Hans5958 avatar Mar 10 '22 07:03 Hans5958

Preferably without Algolia

:(

Weredime avatar Jul 16 '22 17:07 Weredime