From 6e56d2daa1aa70b13c03f36130ee335774609f27 Mon Sep 17 00:00:00 2001 From: James Panther <4462786+jpanther@users.noreply.github.com> Date: Mon, 25 Apr 2022 11:12:02 +1000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Check=20`hugo.IsProduction`=20wh?= =?UTF-8?q?en=20including=20analytics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ref #179 --- CHANGELOG.md | 1 + layouts/partials/analytics.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c5a347a..70908730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Changed - Updated French translation ([#178](https://github.com/jpanther/congo/pull/178)) +- Analytics partial now checks `hugo.IsProduction` instead of `.Site.IsServer` before including scripts ([#179](https://github.com/jpanther/congo/issues/179)) - Upgrade to Tailwind v3.0.24 ([#176](https://github.com/jpanther/congo/pull/176)) - Upgrade to Mermaid v9.0.1 ([#183](https://github.com/jpanther/congo/pull/183)) diff --git a/layouts/partials/analytics.html b/layouts/partials/analytics.html index 5ed1b981..f8c7c2c2 100644 --- a/layouts/partials/analytics.html +++ b/layouts/partials/analytics.html @@ -1,4 +1,4 @@ -{{ if not .Site.IsServer }} +{{ if hugo.IsProduction }} {{ with .Site.Params.fathomAnalytics.site }} {{ if isset $.Site.Params.fathomanalytics "domain" }}