diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 48b6ebd..bc8bcf0 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,7 +15,11 @@
{{ $cssTemplate := resources.Get "css/main.css" }}
-{{ $style := $cssTemplate | resources.ExecuteAsTemplate "css/style.css" . | resources.ToCSS | resources.Fingerprint "sha256" }}
+{{ $style := $cssTemplate | resources.ExecuteAsTemplate "css/style.css" . | resources.ToCSS }}
+{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+ {{ $style = $style | resources.Minify }}
+{{ end }}
+{{ $style = $style | resources.Fingerprint "sha256" }}
{{ range .Site.Params.customCSS -}}