diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-05 03:11:36 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-05 03:11:36 +0200 |
| commit | 16fee44dbd2efe2fc968a71b4a21c72d36f7ec1e (patch) | |
| tree | 2f315c4fc248fb3886cd848f6ec9c28779e28c96 /assets | |
| parent | ef8c42c2e959edc8dba65c8c20acf41088f14b79 (diff) | |
| download | gohugo-theme-ed-16fee44dbd2efe2fc968a71b4a21c72d36f7ec1e.tar.gz | |
Add support of indexing multi-language content
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/search.js | 3 |
1 files changed, 3 insertions, 0 deletions
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'); |
