{{- $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/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 }} {{- $tinyseg := false }} {{- $wordcut := false }} {{- range $contentlangs }} {{- if and (not $tinyseg) (or (eq . "ja")) }} {{- $tinyseg = true }} {{- end }} {{- if and (not $wordcut) (or (eq . "hi") (eq . "th")) }} {{- $wordcut = true }} {{- end }} {{- $file := (printf "js/lunr/lunr.%s.min.js" .) }} {{- end }}