feat: support Hugo v0.133+ by removing deprecated Hugo variable (#3137)

`site.GoogleAnalytics` variable is deprecated since Hugo ~v0.133 (a warning was shown since v0.120.0+) and Hugo now introduced a breaking change without any backwards compatibility causing all existing sites to break. Theis Hugo variable would need to be changed to `site.Config.Services.GoogleAnalytics.ID`, however that then breaks compatibility with all the sites on earlier Hugo versions. Thus, omit fetching this configuration variable since it should be set via the dedicated Analytics sections in `params.yaml` anyway.
This commit is contained in:
Filip Vukelic authored and GitHub committed 2024-09-02 00:00:03 +01:00
1 parent 8778c4b5ed
commit ec9127eaf8
1 file changed
+1 -1
@@ -1,4 +1,4 @@
{{ $ga := site.Params.marketing.analytics.google_analytics | default site.GoogleAnalytics | default "" }}
{{ $ga := site.Params.marketing.analytics.google_analytics | default "" }}
{{ if hugo.IsProduction | and $ga }}