Skip to content

Commit

Permalink
fix: remove deprecated google analytics reference in head.html (#435)
Browse files Browse the repository at this point in the history
ERROR deprecated: .Site.GoogleAnalytics was deprecated in Hugo v0.120.0 and will be removed in Hugo 0.133.0. Use .Site.Config.Services.GoogleAnalytics.ID instead.
  • Loading branch information
eskopp authored Aug 18, 2024
1 parent e83c11f commit 852a07b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,11 @@
{{ partialCached "head-css.html" . }}


<!-- Google Analytics -->
{{- if and (eq hugo.Environment "production") (or .Site.GoogleAnalytics .Site.Config.Services.GoogleAnalytics.ID) }}
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin />
{{ partial "google-analytics.html" . }}
{{- end }}

<!-- Google Analytics -->
{{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }}
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin />
{{ partial "google-analytics.html" . }}
{{- end }}

<script>
/* Initialize light/dark mode */
Expand Down

0 comments on commit 852a07b

Please sign in to comment.