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 --- layouts/partials/scripts.html | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'layouts') 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 -}} -- cgit v1.2.3