diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-17 12:56:24 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-07-17 12:56:24 +0200 |
| commit | 92da64ffba670f26c07b54dd1d409cd46aa44a58 (patch) | |
| tree | 6565ad81eac546bc158452d9897a09ba308cdefb /assets | |
| parent | 4c76f05065c4eb7b12695470b0f32c764a5bb250 (diff) | |
| download | gohugo-theme-ed-92da64ffba670f26c07b54dd1d409cd46aa44a58.tar.gz | |
Configure English by default as a language for content
Diffstat (limited to 'assets')
| -rw-r--r-- | assets/js/search.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/assets/js/search.js b/assets/js/search.js index b0855d2..3c24501 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -14,8 +14,11 @@ async function initSearchIndex() { searchIndex = lunr(function () { // eslint-disable-line no-undef // Set up the pipeline for indexing content in multiple languages if (Array.isArray(searchConfig.lunrLanguages)) { + let langs = new Set(); + searchConfig.lunrLanguages.forEach(item => langs.add(item)); + langs.add('en'); const pipeline = lunr.multiLanguage( // eslint-disable-line no-undef - ...searchConfig.lunrLanguages + ...langs ); this.use(pipeline); |
