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

gitlab.com/toryanderson/hugo-icarus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exampleSite/config.toml5
-rw-r--r--layouts/partials/footer_js.html10
2 files changed, 3 insertions, 12 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index a9be712..00a4653 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -3,6 +3,8 @@ languageCode = "en-us"
title = "Icarus"
# Enable comments by entering your Disqus shortname
disqusShortname = "spf13"
+# Enable Google Analytics by entering your tracking code
+googleAnalytics = ""
# Define the number of posts per site
paginate = 10
theme = "hugo-icarus-theme"
@@ -20,9 +22,6 @@ theme = "hugo-icarus-theme"
site_description = ""
copyright = "Powered by [Hugo](//gohugo.io). Theme by [PPOffice](http://github.com/ppoffice)."
- # Enable Google Analytics by entering your tracking code
- google_analytics = ""
-
# Format dates with Go's time formating
date_format = "2006-01-02"
diff --git a/layouts/partials/footer_js.html b/layouts/partials/footer_js.html
index affbddb..cb0d080 100644
--- a/layouts/partials/footer_js.html
+++ b/layouts/partials/footer_js.html
@@ -1,12 +1,4 @@
-{{ with .Site.Params.google_analytics }}
-{{ "<!-- Google Analytics -->" | safeHTML }}
-<script>
- var _gaq=[['_setAccount','{{ . }}'],['_trackPageview']];
- (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
- g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
- s.parentNode.insertBefore(g,s)}(document,'script'));
-</script>
-{{ end }}
+{{ template "_internal/google_analytics.html" . }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="{{ .Site.BaseURL }}fancybox/jquery.fancybox.pack.js"></script>
<script src="{{ .Site.BaseURL }}js/script.js"></script>