diff options
author | Maksim Iakunin <yakuninm+github@gmail.com> | 2021-10-05 16:18:47 +0300 |
---|---|---|
committer | Maksim Iakunin <yakuninm+github@gmail.com> | 2021-10-05 16:18:47 +0300 |
commit | 4d405ead5d68b829c9544ab3e36ad02944ab1ff6 (patch) | |
tree | 7c98ab6bd12eaaa1467707c0b1aa21917a86df97 /layouts/partials/head.html | |
parent | f996392dda0e3dc4e35d2ffb84c5c894c30f5a01 (diff) |
#101: Simplifying environment detection
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r-- | layouts/partials/head.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 5aaa6cd..8dfcd5c 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -41,7 +41,7 @@ <meta property="article:tag" content=""> <meta property="article:publisher" content="https://www.facebook.com/XXX"> --> -{{ if and (.Site.GoogleAnalytics) (or (eq (getenv "HUGO_ENV") "production") (eq .Site.Params.env "production")) }} +{{ if and (.Site.GoogleAnalytics) (hugo.IsProduction) }} {{ template "_internal/google_analytics.html" . }} {{ end }} |