{{- $assetBusting := not .Site.Params.disableAssetsBusting }} {{- $pageBaseLang := replaceRE "([a-z]+).*" "${1}" .Page.Lang }} {{- $contentlangs := (union (slice | append .Site.Params.additionalContentLanguage) (slice $pageBaseLang)) }} {{- $quotedcontentlangs := slice }} {{- $missingcontentlangs := slice }} {{- range $contentlangs }} {{- $f := printf "/static/js/lunr.%s.min.js" . }} {{- if partialCached "fileExists.hugo" $f $f }} {{- $quotedcontentlangs = $quotedcontentlangs | append (printf "'%s'" .) }} {{- else }} {{- $missingcontentlangs = $missingcontentlangs | append . }} {{- end }} {{- end }} {{- $contentlangs = $contentlangs | complement $missingcontentlangs }} {{- range $contentlangs }} {{- $file := (printf "js/lunr.%s.min.js" .) }} {{- end }}