From dd0c7a3363ab8e76982a3fd61732b2927b9e1c3e Mon Sep 17 00:00:00 2001 From: Erik Skopp <129506395+eskopp@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:48:05 +0200 Subject: [PATCH] .Site.Config.Services.GoogleAnalytics.ID 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. --- layouts/partials/head.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index ebaab67a..5c27e860 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -30,12 +30,11 @@ {{ partialCached "head-css.html" . }} - - {{- if and (eq hugo.Environment "production") (or .Site.GoogleAnalytics .Site.Config.Services.GoogleAnalytics.ID) }} - - {{ partial "google-analytics.html" . }} - {{- end }} - + +{{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }} + + {{ partial "google-analytics.html" . }} +{{- end }}