From 82832c1244f2d536c754efb98fbdb02b1844f4c7 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 7 Sep 2017 21:41:16 +0200 Subject: Make use of the base template --- layouts/_default/baseof.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 layouts/_default/baseof.html (limited to 'layouts/_default/baseof.html') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..a45cf37 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,8 @@ +{{ partial "head.html" . }} + + {{ partial "sidebar.html" . }} +
+ {{ block "main" . -}}{{- end }} +
+ + \ No newline at end of file -- cgit 1.4.1 From 7cf2943ef4a905b46f77137a0321a4fc996a3b9e Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 7 Sep 2017 21:56:31 +0200 Subject: Add Google Analytics support Closes #44 --- README.md | 18 +++++++++++++++++- layouts/_default/baseof.html | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'layouts/_default/baseof.html') diff --git a/README.md b/README.md index 41f2d5e..82660cb 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ It pairs a prominent sidebar with uncomplicated content. - [Themes](#themes) - [Reverse layout](#reverse-layout) - [Disqus](#disqus) + - [Google Analytics](#google-analytics) - [Author](#author) - [Ported by](#ported-by) - [License](#license) @@ -119,7 +120,7 @@ params: ### Disqus -You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to your config file. +You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to your config file. **TOML** ```toml @@ -128,6 +129,21 @@ disqusShortname = "spf13" > **Note:** Previous version 1.0 the Disqus shortname had to be defined inside the `[params]` block. + +## Google Analytics + +Google Analytics can be enabled by assigning your tracking code to the `googleAnalytics` variable in the config file: + +**TOML** +```toml +googleAnalytics = "Your tracking code" +``` + +**YAML** +```yaml +googleAnalytics: Your tracking code +``` + ## Author **Mark Otto** - diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a45cf37..0c87c3f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,5 +4,7 @@
{{ block "main" . -}}{{- end }}
+ + {{ template "_internal/google_analytics_async.html" . }} \ No newline at end of file -- cgit 1.4.1