From 038054b8206a9c25e84adeb0f0f355abd22d6143 Mon Sep 17 00:00:00 2001 From: Arne Rief Date: Mon, 22 Dec 2025 14:02:07 +0100 Subject: CSS & JS splitting, small fix section badge --- layouts/partials/head/css.html | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) (limited to 'layouts/partials/head/css.html') diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index c3c6e33..d4e894e 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -1,9 +1,21 @@ -{{- with resources.Get "css/main.css" }} - {{- if hugo.IsDevelopment }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} +{{- with resources.Get "css/main.css" -}} + {{- $allStylesheets := slice + . + (resources.Get "css/header.css") + (resources.Get "css/navmenu.css") + (resources.Get "css/footer.css") + (resources.Get "css/post-card.css") + (resources.Get "css/page.css") + (resources.Get "css/post.css") + (resources.Get "css/list-navigation.css") + (resources.Get "css/search.css") + -}} + {{- $cssBundle := $allStylesheets | resources.Concat "css/bundle.css" -}} + + {{- if hugo.IsDevelopment -}} + + {{- else -}} + {{- $css := $cssBundle | minify | fingerprint -}} + + {{- end -}} {{- end -}} -- cgit v1.2.3