Skip to content

Commit

Permalink
feat: support Hugo v0.133+ by removing deprecated Hugo variable (#3137)
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
filvuk authored Sep 1, 2024
1 parent 8778c4b commit ec9127e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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 }}

Expand Down

0 comments on commit ec9127e

Please # to comment.