From c2cdd9a02a968738438c48d246ae3949a4e032fc Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 26 Nov 2015 22:25:03 +0100 Subject: [PATCH] Replace Google Analytics with internal tmpl --- exampleSite/config.toml | 4 ++-- layouts/partials/js.html | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index e3622b1..584c73e 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -3,6 +3,8 @@ baseurl = "http://replace-this-with-your-domain.com/" languageCode = "en-us" title = "Hugo Cactus Theme" theme = "hugo-cactus-theme" +# Enter your tracking code to enable Google Analytics +googleAnalytics = "" [params] name = "Mr. Hugo" @@ -12,8 +14,6 @@ theme = "hugo-cactus-theme" twitter = "Your Twitter account" # Disable comments by leaving disqusShortname empty disqusShortname = "spf13" - # Enter your tracking code to enable Google Analytics - googleAnalytics = "" enableRSS = true # The variables below are optionally too and can be used to diff --git a/layouts/partials/js.html b/layouts/partials/js.html index 0b0ab80..2cff071 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -2,13 +2,4 @@ - -{{ with .Site.Params.googleAnalytics }} -{{ "" | safeHTML }} - -{{ end }} \ No newline at end of file +{{ template "_internal/google_analytics.html" . }}