From 6ac8506eec7b47c87051947c787ffa48c1ad8313 Mon Sep 17 00:00:00 2001 From: Philippe Vinchon Date: Sun, 23 Feb 2020 23:14:53 +0000 Subject: Update baseof.html Don't publish analytics events during development Solution from https://discourse.gohugo.io/t/how-to-exclude-google-analytics-when-running-under-hugo-local-server/6092/34 --- layouts/_default/baseof.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 4fada03..af088c4 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,6 +5,8 @@ {{ block "main" . -}}{{- end }} - {{ template "_internal/google_analytics_async.html" . }} + {{ if not .Site.IsServer }} + {{ template "_internal/google_analytics_async.html" . }} + {{ end }} -- cgit v1.2.1-24-ge1ad