Closed artycorp closed 4 years ago
I suspect you only modified src/index.js
. This modification will let you generate multi-language index file but you can't load the index file unless you also modify the SearchBar side.
You'll also need to add lunr-languages
statements into src/theme/SearchBar/index.js
so that SearchBar can load the multi-language index file. Just add the statements after the following line. (adding require
statements works but I'm not sure mixing import/require statements is appropriate)
Interesting, I hadn't thought about stemming non-English languages. I am wondering whether there really is the usecase of using multiple languages on the same page/document or if we can assume that every page is written in a single language? @artycorp are your pages a mix of Russian and English?
I added support for multiple languages in 187b6d2 - took some time to wrap my head around how lunr-languages
works, but it should now work fine for single and multiple languages :tada:
Good afternoon!
I wanted to index the document in Russian:
-In the source code, index.js added the following:
result:
i am not strong in js can you help me?