diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index fcf19979..b53aa672 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -3,8 +3,7 @@
{{ hugo.Generator }}
-{{/* NOTE: For Production make sure you add `HUGO_ENV="production"` before your build command */}}
-{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+{{ if hugo.IsProduction }}
{{ else }}