From 2863a3a02908326d0ddd5612fded2b3e66f55b7f Mon Sep 17 00:00:00 2001 From: Xin Date: Sun, 18 Aug 2024 14:41:40 +0100 Subject: [PATCH] fix: remove deprecated site.GoogleAnalytics (#438) * fix: remove deprecated site.GoogleAnalytics * ci: bump netlify Hugo version --- layouts/partials/google-analytics.html | 8 +------- netlify.toml | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/layouts/partials/google-analytics.html b/layouts/partials/google-analytics.html index 92190068..02b0e61b 100644 --- a/layouts/partials/google-analytics.html +++ b/layouts/partials/google-analytics.html @@ -1,10 +1,4 @@ -{{/* site.GoogleAnalytics is deprecated in Hugo v0.120.0 */}} -{{/* it will be removed in a future version */}} -{{- $gtagID := "" -}} -{{- with site.GoogleAnalytics -}}{{ $gtagID = . }}{{- end -}} -{{- with site.Config.Services.GoogleAnalytics.ID -}}{{ $gtagID = . }}{{- end -}} - -{{- with $gtagID }} +{{- with site.Config.Services.GoogleAnalytics.ID }}