Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

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

Open
chinkung opened this issue Sep 13, 2021 · 0 comments
Open

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

chinkung opened this issue Sep 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@chinkung
Copy link
Contributor

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 chinkung added the enhancement New feature or request label Sep 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant