diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 3f5edb6..fcfd09c 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -19,7 +19,7 @@
{{- if .Params.Author -}}
{{ end -}}
- {{ if eq (getenv "HUGO_ENV") "production" }}
+ {{ if hugo.IsProduction }}
{{ else }}