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

github.com/kimcc/hugo-theme-noteworthy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkendo5731 <aur.baumann@gmail.com>2020-04-03 13:48:44 +0300
committerkendo5731 <aur.baumann@gmail.com>2020-04-03 13:50:22 +0300
commitddd777846559db11ba0d71b5e60be8bd0c345640 (patch)
tree61acf6607844792082be12547748858d042d0f73
parent9ec04a297870ce8aeb7eb341b5904fb4867c1128 (diff)
exclude google analytics when running under hugo local server
-rw-r--r--layouts/partials/head.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index b517fd1..66029c0 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -29,5 +29,8 @@
{{ with .OutputFormats.Get "RSS" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end }}
- {{ template "_internal/google_analytics.html" . }}
+
+ {{- if not .Site.IsServer -}}
+ {{ template "_internal/google_analytics.html" . }}
+ {{- end -}}
</head>