From b1c697228c13d3ce523682fb47e7e9e3913311bc Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 31 Oct 2023 00:11:46 +0100 Subject: [PATCH] Head: Include all JavaScript sources in js directory Co-authored-by: c6ristian --- themes/ccchh/layouts/partials/head.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/themes/ccchh/layouts/partials/head.html b/themes/ccchh/layouts/partials/head.html index 2107397..6f0fd83 100644 --- a/themes/ccchh/layouts/partials/head.html +++ b/themes/ccchh/layouts/partials/head.html @@ -1,4 +1,5 @@ {{- $options := dict "transpiler" "libsass" "targetPath" "css/style.css" -}} +{{- $jsResources := resources.Match "js/*.js" }} @@ -10,9 +11,11 @@ {{- end }} - {{ with resources.Get "js/roomstate.js" | js.Build | minify | fingerprint -}} + {{- range $jsResources }} + {{- with . | js.Build | minify | fingerprint }} {{- end }} + {{- end }} {{ range .AlternativeOutputFormats -}} {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}