Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alexandrevicenzi/soho.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Vinchon <p.vinchon@gmail.com>2020-02-24 02:14:53 +0300
committerAndreas Deininger <andreas@deininger.net>2022-03-02 22:53:52 +0300
commit2736df1a57c003d9f7e46ac90a1ab05b5187ba3d (patch)
treef9300921efcea9404cc15cabba7d43333f5a7f2a
parent32d39a31c779bdced0941f21b3faf13ea13be5c5 (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 57ef293..f5fa96e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -74,6 +74,8 @@
<script src="{{ . | relURL }}"></script>
{{- end}}
- {{ template "_internal/google_analytics_async.html" . }}
+ {{ if not .Site.IsServer }}
+ {{ template "_internal/google_analytics_async.html" . }}
+ {{ end }}
</body>
</html>