aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanda-z <panda.hust@gmail.com>2019-01-05 22:08:34 +0800
committerolOwOlo <26087907+olOwOlo@users.noreply.github.com>2019-01-05 22:08:34 +0800
commit915174fdbaf728b2aa5edb05bdd842cd82670e02 (patch)
tree2d532aef933c8c1ebf5ca3b885243b52d1c57366
parent8a727486e82ed9645d1abcf4f67eedbed2790a80 (diff)
feat(scripts): disable google analytics on localhost (#123)
-rw-r--r--layouts/partials/scripts.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 561bd3c..de35229 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -90,7 +90,7 @@
{{- end }}
<!-- Analytics -->
-{{- if .Site.GoogleAnalytics -}}
+{{- if and (not .Site.IsServer) .Site.GoogleAnalytics -}}
{{ template "_internal/google_analytics_async.html" . }}
{{- end -}}