From 7100e4de11a69c2d35416e88a7f0a67aa174f3f6 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Wed, 23 Dec 2020 15:53:33 -0800 Subject: [PATCH] Use hugo.isProduction for production environment checks --- 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 d75f84e64a..451c10888e 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 -}} @@ -19,7 +19,7 @@ {{- template "_internal/google_news.html" . -}} {{- template "_internal/schema.html" . -}} {{- template "_internal/twitter_cards.html" . -}} -{{ if eq (getenv "HUGO_ENV") "production" }} +{{ if hugo.IsProduction }} {{ template "_internal/google_analytics_async.html" . }} {{ end }} {{ partialCached "head-css.html" . "asdf" }}