swyxio / swyxkit

An opinionated blog starter for SvelteKit + Tailwind + Netlify. Refreshed for SvelteKit 1.0!
https://swyxkit.netlify.app/
MIT License
668 stars 87 forks source link

todo: implement lightweight full text/fuzzy search #45

Open swyxio opened 2 years ago

swyxio commented 2 years ago

both typesense and algolia require api key signup, which is bleh, so let's try to handroll it like chumps: https://github.com/sw-yx/netlify-plugin-search-index

git-no commented 2 years ago

How would be this fuse.js? It works fine in my app and is super fast.

swyxio commented 2 years ago

yeah i use fusejs under the hood in that thing - welcome to help implement it!

VaithiSniper commented 1 year ago

so if i'm reading this right, we can rework the search with fuse.js?

VaithiSniper commented 1 year ago

can i take it up if so?

VaithiSniper commented 1 year ago

122 added fuse.js

and is this what's expected?

swyxio commented 1 year ago

yup! will review your PR.

we may not want to use Fuse.js exactly since it is 15kb.. there are a good list of alternatives here that at probably lighter and do almost the same thing https://github.com/leeoniya/uFuzzy#user-content-benchmark

swyxio commented 1 year ago

see also the ideas and comments in https://github.com/sw-yx/swyxkit/issues/80