summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Vinchon <p.vinchon@gmail.com>2020-02-23 23:14:53 +0000
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-02-24 00:45:49 +0100
commit6ac8506eec7b47c87051947c787ffa48c1ad8313 (patch)
tree96582964c066f86c0f50ec601c51e5399fc94782
parenta56b6f866fe0a9e6aaf3ecaebf43bf3b2a00a88b (diff)
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
-rw-r--r--layouts/_default/baseof.html4
1 files changed, 3 insertions, 1 deletions
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 }}
</main>
- {{ template "_internal/google_analytics_async.html" . }}
+ {{ if not .Site.IsServer }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
</body>
</html>