From aa316b5eca3985753d7c0d305824aa60da4c77be Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Thu, 23 May 2024 23:21:54 +0200 Subject: [PATCH] Update GA include to definitely not run on staging (#2951) --- layouts/docs/baseof.html | 4 ++-- layouts/docs/changelog.html | 4 ++-- layouts/docs/content.html | 4 ++-- layouts/docs/glossary.html | 4 ++-- layouts/docs/tutorials.html | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 729f022a75..05016ed7e2 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -4,12 +4,12 @@ {{ partial "head.html" . }} - {{- if .Site.GoogleAnalytics -}} + {{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}} - {{- end -}} + {{- end -}}{{- end -}}
{{ partial "navbar.html" . }}
diff --git a/layouts/docs/changelog.html b/layouts/docs/changelog.html index 622a5f3fc1..176a4ffc28 100644 --- a/layouts/docs/changelog.html +++ b/layouts/docs/changelog.html @@ -4,12 +4,12 @@ {{ partial "head.html" . }} - {{- if .Site.GoogleAnalytics -}} + {{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}} - {{- end -}} + {{- end -}}{{- end -}}
{{ partial "navbar.html" . }}
diff --git a/layouts/docs/content.html b/layouts/docs/content.html index ec7fbb0714..e36b677e36 100644 --- a/layouts/docs/content.html +++ b/layouts/docs/content.html @@ -65,8 +65,8 @@

DRAFT

{{ partial "disqus-comment.html" . }} {{ end }} {{ partial "page-meta-lastmod.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{- if hugo.IsProduction -}}{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} {{ partial "feedback.html" . }}
- {{ end }} + {{ end }}{{- end -}} diff --git a/layouts/docs/glossary.html b/layouts/docs/glossary.html index a18be69628..e7212b3ce6 100644 --- a/layouts/docs/glossary.html +++ b/layouts/docs/glossary.html @@ -4,12 +4,12 @@ {{ partial "head.html" . }} - {{- if .Site.GoogleAnalytics -}} + {{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}} - {{- end -}} + {{- end -}}{{- end -}}
{{ partial "navbar.html" . }}
diff --git a/layouts/docs/tutorials.html b/layouts/docs/tutorials.html index 33fb8c4caa..d523b99884 100644 --- a/layouts/docs/tutorials.html +++ b/layouts/docs/tutorials.html @@ -4,12 +4,12 @@ {{ partial "head.html" . }} - {{- if .Site.GoogleAnalytics -}} + {{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}} - {{- end -}} + {{- end -}}{{- end -}}
{{ partial "navbar.html" . }}