#101: Simplifying environment detection

This commit is contained in:
Maksim Iakunin 2021-10-05 16:18:47 +03:00
parent f996392dda
commit 4d405ead5d
No known key found for this signature in database
GPG key ID: 629DE6EA48DAF1F4
4 changed files with 7 additions and 9 deletions

View file

@ -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 }}