🐛 Change analytics to use .IsProduction

Fixes: #73
This commit is contained in:
James Panther 2023-06-04 10:44:42 +10:00
parent d019329eb1
commit 323e97502c
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Upgrade to Tailwind v3.3.2 ([#74](https://github.com/jpanther/lynx/pull/74)) - Upgrade to Tailwind v3.3.2 ([#74](https://github.com/jpanther/lynx/pull/74))
### Fixed
- Error building site when using Hugo v0.112.0 or later ([#73](https://github.com/jpanther/lynx/issues/73))
## [1.2.4] - 2023-01-18 ## [1.2.4] - 2023-01-18
### Changed ### Changed

View File

@ -1,4 +1,4 @@
{{ if not .Site.IsServer }} {{ if hugo.IsProduction }}
{{ with .Site.Params.fathomAnalytics.site }} {{ with .Site.Params.fathomAnalytics.site }}
{{ if isset $.Site.Params.fathomanalytics "domain" }} {{ if isset $.Site.Params.fathomanalytics "domain" }}
<script defer src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}"></script> <script defer src="https://{{ $.Site.Params.fathomanalytics.domain }}/script.js" data-site="{{ . }}"></script>