use .Hugo variable instead of .hugo function netlify current doesn't work with .hugo.IsProduction (netlify is running v0.54.0) and hence forced to use .hugo.Environment which says will be deprecated soon and should not be used (as of v0.69.2)
Prithu Goswami prithugoswami524@gmail.com
Sun, 10 May 2020 07:47:56 +0530
1 files changed,
1 insertions(+),
1 deletions(-)
M
hugo-site/layouts/partials/head.html
→
hugo-site/layouts/partials/head.html
@@ -12,7 +12,7 @@ <link href="https://fonts.googleapis.com/css?family=Noto+Serif:400" rel="stylesheet">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/blog.css"> <link rel="icon" type="img/png" href="/img/favicon.png"> - {{ if hugo.IsProduction }} + {{ if eq .Hugo.Environment "production" }} <script async src="https://www.googletagmanager.com/gtag/js?id=UA-165619342-1"></script> <script> window.dataLayer = window.dataLayer || [];