fix: remove deprecated google analytics reference in head.html (#435)

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.
This commit is contained in:
Erik Skopp 2024-08-18 13:31:50 +02:00 committed by GitHub
parent e83c11f31a
commit 852a07b15e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,12 +31,11 @@
<!-- Google Analytics --> <!-- Google Analytics -->
{{- if and (eq hugo.Environment "production") (or .Site.GoogleAnalytics .Site.Config.Services.GoogleAnalytics.ID) }} {{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }}
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin /> <link rel="preconnect" href="https://www.googletagmanager.com" crossorigin />
{{ partial "google-analytics.html" . }} {{ partial "google-analytics.html" . }}
{{- end }} {{- end }}
<script> <script>
/* Initialize light/dark mode */ /* Initialize light/dark mode */
const defaultTheme = '{{ site.Params.theme.default | default `system`}}'; const defaultTheme = '{{ site.Params.theme.default | default `system`}}';