diff options
author | kendo5731 <aur.baumann@gmail.com> | 2020-04-03 13:48:44 +0300 |
---|---|---|
committer | kendo5731 <aur.baumann@gmail.com> | 2020-04-03 13:50:22 +0300 |
commit | ddd777846559db11ba0d71b5e60be8bd0c345640 (patch) | |
tree | 61acf6607844792082be12547748858d042d0f73 | |
parent | 9ec04a297870ce8aeb7eb341b5904fb4867c1128 (diff) |
exclude google analytics when running under hugo local server
-rw-r--r-- | layouts/partials/head.html | 5 |
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> |