fix error: Use .Site.Config.Services.GoogleAnalytics.ID instead.

This commit is contained in:
fi6 2024-08-21 15:36:07 +08:00 committed by GitHub
commit eb6bff7945
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
{{ $ga := site.Params.marketing.analytics.google_analytics | default site.GoogleAnalytics | default "" }} {{ $ga := site.Params.marketing.analytics.google_analytics | default site.Config.Services.GoogleAnalytics.ID | default "" }}
{{ $show_feedback := .Params.feedback | default true }} {{ $show_feedback := .Params.feedback | default true }}
{{ if hugo.IsProduction | and $ga | and $show_feedback }} {{ if hugo.IsProduction | and $ga | and $show_feedback }}

View file

@ -1,4 +1,4 @@
{{ $ga := site.Params.marketing.analytics.google_analytics | default site.GoogleAnalytics | default "" }} {{ $ga := site.Params.marketing.analytics.google_analytics | default site.Config.Services.GoogleAnalytics.ID | default "" }}
{{ if hugo.IsProduction | and $ga }} {{ if hugo.IsProduction | and $ga }}

View file

@ -1,5 +1,5 @@
{{/* TODO: port JS & response text from Bootstrap module. Re-integrate with GA plus Fathom/Plausible */}} {{/* TODO: port JS & response text from Bootstrap module. Re-integrate with GA plus Fathom/Plausible */}}
{{/* $ga := site.Params.marketing.analytics.google_analytics | default site.GoogleAnalytics | default "" */}} {{/* $ga := site.Params.marketing.analytics.google_analytics | default site.Config.Services.GoogleAnalytics.ID | default "" */}}
{{ $show_feedback := .Params.feedback | default true }} {{ $show_feedback := .Params.feedback | default true }}
{{ if hugo.IsProduction | and $show_feedback }}{{/* | and $ga */}} {{ if hugo.IsProduction | and $show_feedback }}{{/* | and $ga */}}