{{- $link := "" }} {{- if or (.Site.Home.OutputFormats.Get "JSON") (.Site.Home.OutputFormats.Get "SEARCH") }} {{- with .Site.Home.OutputFormats.Get "SEARCHPAGE" }} {{- $link = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }} {{- end }} {{- end }} {{- $c:="" }} {{ if $link }}
{{ end }} {{- $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 }}