diff options
author | vjeantet <valere.jeantet@gmail.com> | 2020-09-06 22:42:03 +0300 |
---|---|---|
committer | vjeantet <valere.jeantet@gmail.com> | 2020-09-06 22:42:03 +0300 |
commit | b4f0e0e7b5483ac0691bebd72deaeec0af71838c (patch) | |
tree | f43b770d64fd79af3250191490b84f600fc4f810 | |
parent | 9b1b58fb168e338a34c23c09e234274e8dda5d90 (diff) |
user Google Analytics only when set in configuration
-rw-r--r-- | exampleSite/config-template.toml | 2 | ||||
-rw-r--r-- | exampleSite/layouts/partials/head.html | 0 | ||||
-rw-r--r-- | layouts/partials/html-head.html | 4 |
3 files changed, 6 insertions, 0 deletions
diff --git a/exampleSite/config-template.toml b/exampleSite/config-template.toml index 5c7d634..5ec5a61 100644 --- a/exampleSite/config-template.toml +++ b/exampleSite/config-template.toml @@ -12,6 +12,8 @@ pygmentsStyle = "monokai" defaultContentLanguageInSubdir= false enableMissingTranslationPlaceholders = false +# googleanalytics = "UA-123-45" + # Keep this as is [outputs] home = [ "HTML", "RSS", "JSON"] diff --git a/exampleSite/layouts/partials/head.html b/exampleSite/layouts/partials/head.html deleted file mode 100644 index e69de29..0000000 --- a/exampleSite/layouts/partials/head.html +++ /dev/null diff --git a/layouts/partials/html-head.html b/layouts/partials/html-head.html index e2c46bf..41b0143 100644 --- a/layouts/partials/html-head.html +++ b/layouts/partials/html-head.html @@ -62,5 +62,9 @@ i.expand_more:before { var baseurl = "{{.Site.BaseURL}}"; </script> + +{{ template "_internal/google_analytics.html" . }} + + {{- partial "head.html" . }} |