From b522ff81e0b5156c04ac85fe7ad36210666a9949 Mon Sep 17 00:00:00 2001 From: Olivier Roques Date: Tue, 24 Nov 2020 10:50:26 +0100 Subject: Add Google Analytics option to example site --- exampleSite/config.toml | 3 ++- layouts/partials/head.html | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3541a4d..a78b5d6 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -3,7 +3,8 @@ baseURL = "https://example.com" theme = "researcher" disableKinds = ["taxonomy", "term"] enableEmoji = true -math = false # enable KaTeX (https://katex.org/) globally +math = false # enable KaTeX (https://katex.org/) globally +googleAnalytics = "" # add your tracking id [params] author = "Olivier Roques" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 1260007..bc0864a 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,10 +6,6 @@ - {{ if not .Site.IsServer }} - {{ template "_internal/google_analytics.html" . }} - {{ end }} - @@ -19,4 +15,8 @@ {{ with .Site.Params.favicon }} {{ end }} + + {{ if not .Site.IsServer }} + {{ template "_internal/google_analytics.html" . }} + {{ end }} -- cgit v1.2.3