From 6105628c4237070d573fbdb70819b01366c94f08 Mon Sep 17 00:00:00 2001 From: "Jens M. Sauer" Date: Sun, 28 Jul 2024 18:44:14 +0200 Subject: [PATCH 1/2] Remove whitelines --- layouts/_default/baseof.html | 5 ----- 1 file changed, 5 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6619cf0..5ec8921 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,18 +6,13 @@ This Hugo theme is licensed under the Creative Commons Attribution 3.0 License. --> - {{ partial "head" . }} - -
{{- block "main" . }}{{- end }}
- {{ partial "scripts" . }} - From 8ad562468ea38411820c5a4b586c4040d56658d9 Mon Sep 17 00:00:00 2001 From: "Jens M. Sauer" Date: Sun, 28 Jul 2024 18:53:27 +0200 Subject: [PATCH 2/2] fingerprint all scripts --- layouts/partials/scripts.html | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html index d2e5b78..b01721e 100644 --- a/layouts/partials/scripts.html +++ b/layouts/partials/scripts.html @@ -1,15 +1,3 @@ - -{{ $jQuery := resources.Get "js/jquery.min.js" }} -{{ $scrollex := resources.Get "js/jquery.scrollex.min.js" }} -{{ $scrolly := resources.Get "js/jquery.scrolly.min.js" }} -{{ $browser := resources.Get "js/browser.min.js" }} -{{ $breakpoints := resources.Get "js/breakpoints.min.js" }} -{{ $util := resources.Get "js/util.js" }} -{{ $main := resources.Get "js/main.js" }} -{{ $demo := resources.Get "js/demo.js" }} - -{{ $js := slice $jQuery $scrollex $scrolly $browser $breakpoints $util $main $demo | resources.Concat "js/bundle.js" | minify }} - - - - +{{ with resources.Match "js/*" | resources.Concat "js/bundle.js" | minify | fingerprint }} + +{{ end }}