mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-03-20 16:15:09 +00:00
search: move lunr to subdir #427
This commit is contained in:
parent
bf1c4dce2f
commit
6bdf05fe96
29 changed files with 5 additions and 5 deletions
layouts/partials
static/js/lunr
lunr.ar.min.jslunr.da.min.jslunr.de.min.jslunr.du.min.jslunr.en.min.jslunr.es.min.jslunr.fi.min.jslunr.fr.min.jslunr.hi.min.jslunr.hu.min.jslunr.it.min.jslunr.ja.min.jslunr.jp.min.jslunr.ko.min.jslunr.min.jslunr.multi.min.jslunr.nl.min.jslunr.no.min.jslunr.pt.min.jslunr.ro.min.jslunr.ru.min.jslunr.stemmer.support.min.jslunr.sv.min.jslunr.ta.min.jslunr.th.min.jslunr.tr.min.jslunr.vi.min.jslunr.zh.min.js
|
@ -16,7 +16,7 @@
|
|||
{{- $quotedcontentlangs := slice }}
|
||||
{{- $missingcontentlangs := slice }}
|
||||
{{- range $contentlangs }}
|
||||
{{- $f := printf "/static/js/lunr.%s.min.js" . }}
|
||||
{{- $f := printf "/static/js/lunr/lunr.%s.min.js" . }}
|
||||
{{- if partialCached "fileExists.hugo" $f $f }}
|
||||
{{- $quotedcontentlangs = $quotedcontentlangs | append (printf "'%s'" .) }}
|
||||
{{- else }}
|
||||
|
@ -28,11 +28,11 @@
|
|||
var contentLangs=[{{ delimit $quotedcontentlangs ", " | safeJS }}];
|
||||
</script>
|
||||
<script src="{{"js/auto-complete.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/lunr.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/lunr.stemmer.support.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/lunr.multi.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/lunr/lunr.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/lunr/lunr.stemmer.support.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/lunr/lunr.multi.min.js" | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
{{- range $contentlangs }}
|
||||
{{- $file := (printf "js/lunr.%s.min.js" .) }}
|
||||
{{- $file := (printf "js/lunr/lunr.%s.min.js" .) }}
|
||||
<script src="{{ $file | relURL}}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
{{- end }}
|
||||
<script src="{{ "js/search.js" | relURL }}{{ if $assetBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
Loading…
Add table
Reference in a new issue