From c66f121f8cb6172fe832df59f03d604c80e6e714 Mon Sep 17 00:00:00 2001 From: Correl Roush Date: Thu, 27 Jun 2019 02:01:38 -0400 Subject: [PATCH] Configure google analytics --- config.toml | 1 + layouts/_default/baseof.html | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config.toml b/config.toml index 08af86d..a72dc05 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,7 @@ baseURL = "http://example.org/" languageCode = "en-us" title = "Projects and Coding Adventures" +googleAnalytics = "UA-429788-2" disqusShortname = "correl" theme = "hugo-theme-m10c" staticDir = ["static"] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b0cb197..d67ab97 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,7 +10,9 @@ {{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}} - {{ template "_internal/google_analytics.html" . }} + {{ if not .Site.IsServer }} + {{ template "_internal/google_analytics.html" . }} + {{ end }} {{ template "_internal/twitter_cards.html" . }} {{ template "_internal/opengraph.html" . }}