matcornic / hugo-theme-learn

Porting Grav Learn theme to Hugo
https://learn.netlify.com/en/
MIT License
1.61k stars 1.28k forks source link

Use fusejs instead of lunrjs to support searching for more languages #493

Open vicevolf opened 3 years ago

vicevolf commented 3 years ago

I noticed that because of the use of lunrjs, learn theme search seems to be only friendly to English, and lacks support for Japanese, Chinese, Korean, etc.

Fusejs may improve this problem, and it is also friendly to Hugo.

https://github.com/krisk/Fuse

https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae

And support for algolia can be used as an alternative.

vicevolf commented 3 years ago

https://github.com/onweru/compose/

https://github.com/zzossig/hugo-theme-zzo/issues/28

They uses fusejs to search.