mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-06-13 12:20:31 +00:00
parent
d4cbccdde0
commit
20136aa4e7
1 changed files with 5 additions and 3 deletions
|
@ -9,9 +9,11 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if not .Site.Params.disableSearchIndex }}
|
{{- if not .Site.Params.disableSearchIndex }}
|
||||||
{{- $url := path.Join .Site.LanguagePrefix (trim (or .Site.Params.searchIndexURL "searchindex.js") "/") }}
|
{{- $url := path.Join .Site.LanguagePrefix (trim (or .Site.Params.searchIndexURL "searchindex.js") "/") }}
|
||||||
{{- $templateres := resources.Get "_relearn_searchindex.js" }}
|
{{- if .IsHome }}
|
||||||
{{- $resultres := $templateres | resources.ExecuteAsTemplate $url .Site.Home }}
|
{{- $templateres := resources.Get "_relearn_searchindex.js" }}
|
||||||
{{- /* the following code causes Hugo to generate our file - although it is in comments */}}<!-- {{ $resultres.RelPermalink }} -->
|
{{- $resultres := $templateres | resources.ExecuteAsTemplate $url .Site.Home }}
|
||||||
|
{{- /* the following code causes Hugo to generate our file - although it is in comments */}}<!-- {{ $resultres.RelPermalink }} -->
|
||||||
|
{{- end }}
|
||||||
<script>
|
<script>
|
||||||
window.index_js_url={{ (printf "%s%s" $url $assetBusting) | relLangURL }};
|
window.index_js_url={{ (printf "%s%s" $url $assetBusting) | relLangURL }};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue