From 2e70169ce61c35c48f1799d5c67801f22dab8ca1 Mon Sep 17 00:00:00 2001 From: Nikko Miu Date: Fri, 13 Sep 2024 22:05:53 +0000 Subject: [PATCH] Minify and fingerprint chroma --- layouts/partials/head.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index df55c06..7678680 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -103,7 +103,7 @@ {{ else }} - + {{ end }} {{ range .Params.categories }} @@ -145,6 +145,9 @@ {{ $chromaCSS := resources.Get "css/entry.chroma.css" }} {{ $chromaCSSOpts := (dict "noMap" (not hugo.IsDevelopment)) }} {{ $chromaOut := $chromaCSS | postCSS $chromaCSSOpts }} +{{ if not hugo.IsDevelopment }} + {{ $chromaOut = $chromaOut | minify | fingerprint }} +{{ end }} {{ partial "defer-css" $chromaOut.RelPermalink }} {{ partial "defer-css" ("pagefind/pagefind-ui.css" | relURL) }}