From c69907abc2dde8ca2a36895f461063ea393cc199 Mon Sep 17 00:00:00 2001 From: Naresh Mehta Date: Tue, 15 Apr 2025 16:23:04 +0200 Subject: [PATCH 1/2] Fix GoogleAnalytics_async issue The support was dropped in Hugo. --- .../partials/service/google-analytics.html | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/layouts/partials/service/google-analytics.html b/layouts/partials/service/google-analytics.html index 3527c0e..181cc1e 100644 --- a/layouts/partials/service/google-analytics.html +++ b/layouts/partials/service/google-analytics.html @@ -1,4 +1,22 @@ -{{ if not .Site.IsServer }} - {{ template "_internal/google_analytics.html" . }} - {{ template "_internal/google_analytics_async.html" . }} -{{ end }} \ No newline at end of file +{{ if not site.Config.Privacy.GoogleAnalytics.Disable }} + {{- with site.Config.Services.GoogleAnalytics.ID }} + {{- if strings.HasPrefix (lower .) "ua-" }} + {{- warnf "Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value." }} + {{- else }} + + + {{- end }} + {{- end }} +{{- end -}} \ No newline at end of file From ecc6619f095bc4ff7dcc110bf2d8a6a17f131195 Mon Sep 17 00:00:00 2001 From: Naresh Mehta Date: Tue, 15 Apr 2025 17:59:08 +0200 Subject: [PATCH 2/2] Updated X usage in sample pages --- exampleSite/content/en/posts/rich-content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/en/posts/rich-content.md b/exampleSite/content/en/posts/rich-content.md index 86d6127..22656cd 100644 --- a/exampleSite/content/en/posts/rich-content.md +++ b/exampleSite/content/en/posts/rich-content.md @@ -32,7 +32,7 @@ Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-manageme ## Twitter Simple Shortcode -{{< twitter_simple 1085870671291310081 >}} +{{< x user="" id="1085870671291310081" >}}