mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-28 14:30:13 +00:00
18 lines
No EOL
597 B
HTML
18 lines
No EOL
597 B
HTML
{{- $page := .page }}
|
|
{{- $location := .location }}
|
|
{{- if eq $location "header" }}
|
|
{{- with $page }}
|
|
{{- $assetBusting := partialCached "assetbusting.gotmpl" . }}
|
|
{{- $minify := not hugo.IsServer }}
|
|
{{- if and (isset site.Params "minify") (ne site.Params.minify "") }}
|
|
{{- $minify = site.Params.minify }}
|
|
{{- end }}
|
|
{{- with resources.Get "/js/variant.js" }}
|
|
{{- $res := . }}
|
|
{{- if $minify }}
|
|
{{- $res = $res | minify }}
|
|
{{- end }}
|
|
<script src="{{ $res.RelPermalink }}{{ $assetBusting }}"></script>
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }} |