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 /layouts/partials/scripts.html | |
| parent | ef8c42c2e959edc8dba65c8c20acf41088f14b79 (diff) | |
| download | gohugo-theme-ed-16fee44dbd2efe2fc968a71b4a21c72d36f7ec1e.tar.gz | |
Add support of indexing multi-language content
Diffstat (limited to 'layouts/partials/scripts.html')
| -rw-r--r-- | layouts/partials/scripts.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index 1574f7e..3894ae0 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -5,6 +5,14 @@ {{ $vendors = $vendors | append (resources.Get (printf "js/vendor/%s" .) ) }} {{- end -}} +{{- /* TODO: Add support fpr more languages */ -}} +{{- $vendors = $vendors | append (resources.Get "js/vendor/lunr.stemmer.support.js" ) -}} +{{- $lunrLangs := slice "ru" -}} +{{- range $lunrLangs -}} + {{ $vendors = $vendors | append (resources.Get (printf "js/vendor/lunr.%s.js" .) ) }} +{{- end -}} +{{- $vendors = $vendors | append (resources.Get "js/vendor/lunr.multi.js" ) -}} + {{- $vendors = $vendors | resources.Concat "js/vendor-bundle.js" -}} {{- if or (eq (getenv "HUGO_ENV") "production") (eq site.Params.env "production") }} {{- $vendors = $vendors | minify -}} |
