mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-14 18:18:09 +00:00
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:
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 }}
|
||||
|
||||
|
||||
Reference in new issue
Block a user