From ec9127eaf80ba7a0f1c39b4b18c7148b919a3631 Mon Sep 17 00:00:00 2001 From: Filip Vukelic <136091729+filvuk@users.noreply.github.com> Date: Mon, 2 Sep 2024 01:00:03 +0200 Subject: [PATCH] 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. --- .../blox-seo/layouts/partials/analytics/google_analytics.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/blox-seo/layouts/partials/analytics/google_analytics.html b/modules/blox-seo/layouts/partials/analytics/google_analytics.html index 91b9ca8b..ff7edab1 100644 --- a/modules/blox-seo/layouts/partials/analytics/google_analytics.html +++ b/modules/blox-seo/layouts/partials/analytics/google_analytics.html @@ -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 }}