The current hugo supports the output format to export the json for the local search but only english words. If the content is Chinese, how to modify the output format to support the chinese search?
1 Like
I’m using Fuse search on a Japanese site so it should work.
(Correction: not lunr, fuse. Sorry.)
1 Like
Hi Rick,
Could share your sample? Thanks!
I followed one of the tutorials I found in here (sry, it has been so long I don’t remember which) and looked up how to get Fuse to work with Japanese on the web. The key was setting the options being fed to it, and that was done in the search page template:
You also have to make a custom output format in json to act as the search index.
Edit: sorry, I misremembered it even. I used Fuse, not lunr.
The after dark theme is well documented and uses Fuse for fuzzy search:
1 Like
Hi Rick,
The fuse.js is easy to integrate with the hugo workflow to support the chinese search, thanks for your information.
1 Like
it is indeed.