mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-23 10:00:52 +02: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:
parent
8778c4b5ed
commit
ec9127eaf8
1 changed files with 1 additions and 1 deletions
|
@ -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 }}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue