From 7e2e9298db9aa5866813e9ed17454b39aca81798 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 19 Aug 2021 09:36:32 -0400 Subject: [PATCH] Use hugo.IsProduction instead of checking HUGO_ENV --- layouts/partials/head.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 23e6ffc571..fe208c6895 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -7,7 +7,7 @@ {{ end -}} -{{ if and (eq (getenv "HUGO_ENV") "production") (ne $outputFormat "print") -}} +{{ if and hugo.IsProduction (ne $outputFormat "print") -}} {{ else -}} @@ -45,7 +45,7 @@ {{ end }} {{ partial "hooks/head-end.html" . }} -{{ if eq (getenv "HUGO_ENV") "production" }} +{{ if hugo.IsProduction }} {{ if hasPrefix .Site.GoogleAnalytics "G-"}} {{ template "_internal/google_analytics.html" . }} {{ else }}