From 16fee44dbd2efe2fc968a71b4a21c72d36f7ec1e Mon Sep 17 00:00:00 2001 From: Serghei Iakovlev Date: Tue, 5 Jul 2022 03:11:36 +0200 Subject: Add support of indexing multi-language content --- assets/js/search.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'assets/js') diff --git a/assets/js/search.js b/assets/js/search.js index 262a92f..489e8fd 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -40,6 +40,9 @@ async function initSearchIndex() { // Create the lunr index for the search searchIndex = lunr(function () { // eslint-disable-line no-undef + // TODO: Add support fpr more languages + this.use(lunr.multiLanguage('en', 'ru')); + this.field('title'); this.field('categories'); this.field('tags'); -- cgit v1.2.3