uBlogger icon indicating copy to clipboard operation
uBlogger copied to clipboard

[FEATURE] Multi-language content search by lunr.js

Open chinkung opened this issue 3 years ago • 0 comments

Describe the feature you want

Currently uBlogger only able to search in single language only. e.g. if you have more then 1 language (e.g. Thai and English), it would not able to search.

Useful reference

Please take a look at MULTI-LANGUAGE CONTENT in https://lunrjs.com/guides/language_support.html

You need to load additional lunr.multi.js and allow to add additional support lunr-languages in config.toml

var lunr = require("lunr")
require("lunr-languages/lunr.stemmer.support")(lunr)
require('lunr-languages/lunr.multi')(lunr)
require("lunr-languages/lunr.de")(lunr)

var idx = lunr(function () {
  this.use(lunr.multiLanguage('en', 'de'))
})

chinkung avatar Sep 13 '21 08:09 chinkung