From d78cf3ded37a1b416916383a8115c12639a9e99b Mon Sep 17 00:00:00 2001 From: Riley Seaburg Date: Tue, 3 Dec 2024 10:05:36 -0600 Subject: [PATCH] feat: use Hugo's built-in minification pipeline - Update head.html to use Hugo's resource.Minify for CSS and JS - Add fingerprinting for cache busting - Add integrity hashes for security - Implement proper asset pipeline for custom CSS --- themes/digital.gov/layouts/partials/core/head.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/themes/digital.gov/layouts/partials/core/head.html b/themes/digital.gov/layouts/partials/core/head.html index 8ede14b24d..9a091671a9 100644 --- a/themes/digital.gov/layouts/partials/core/head.html +++ b/themes/digital.gov/layouts/partials/core/head.html @@ -224,7 +224,12 @@ {{- $customCSS := resources.Get (printf "dist/%s" .) -}} {{- $customCSSMinified := $customCSS | resources.Minify -}} - + {{- end -}} {{- end -}} @@ -243,7 +248,7 @@ {{/* USWDS Init JS */}} {{- $uswdsInit := resources.Get "dist/js/uswds-init.min.js" -}} {{- $uswdsInitMinified := $uswdsInit | resources.Minify | resources.Fingerprint -}} -