Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvjeantet <valere.jeantet@gmail.com>2020-09-06 22:42:03 +0300
committervjeantet <valere.jeantet@gmail.com>2020-09-06 22:42:03 +0300
commitb4f0e0e7b5483ac0691bebd72deaeec0af71838c (patch)
treef43b770d64fd79af3250191490b84f600fc4f810
parent9b1b58fb168e338a34c23c09e234274e8dda5d90 (diff)
user Google Analytics only when set in configuration
-rw-r--r--exampleSite/config-template.toml2
-rw-r--r--exampleSite/layouts/partials/head.html0
-rw-r--r--layouts/partials/html-head.html4
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" . }}