From e1a46046bcd737c088d56a11396088a22453c820 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 29 May 2022 10:52:15 +0530 Subject: [PATCH] Stop minfiying already minified resources - Keeps the license text for 3rd party lib in place after generation --- layouts/partials/head.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b0e47876..3b566232 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -61,13 +61,13 @@ {{- /* Search */}} {{- if (eq .Layout `search`) -}} -{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) }} +{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} {{- $fusejs := resources.Get "js/fuse.basic.min.js" }} {{- if not site.Params.assets.disableFingerprinting }} -{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }} +{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} {{- else }} -{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }} +{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }} {{- end }} {{- end -}} @@ -76,11 +76,11 @@ {{- $isHLJSdisabled := (site.Params.assets.disableHLJS | default .Params.disableHLJS ) }} {{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (not $isHLJSdisabled)) }} {{- if not site.Params.assets.disableFingerprinting }} -{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify | fingerprint }} +{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | fingerprint }} {{- else }} -{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }} +{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" }} {{- end }} {{- end }}