Use js.Build for all js minify.
This commit is contained in:
parent
aeefabf16b
commit
8dd5e86058
1 changed files with 15 additions and 7 deletions
|
|
@ -6,6 +6,9 @@
|
|||
"piwikSiteID" site.Params.piwikSiteID
|
||||
"plausibleSiteID" site.Params.plausibleSiteID
|
||||
"GoogleAnalytics" site.GoogleAnalytics) -}}
|
||||
{{ if eq hugo.Environment "development" -}}
|
||||
{{ $opts = merge $opts (dict "minify" false) -}}
|
||||
{{ end -}}
|
||||
{{ if and site.Params.piwikTrackerUrl site.Params.piwikSiteID -}}
|
||||
{{ $script := resources.Get "js/tracking.js" | js.Build $opts | fingerprint -}}
|
||||
<script src="{{ $script.RelPermalink }}"></script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue