From 01dd84d129fc59c60b431dbd7047fdd0d06f3237 Mon Sep 17 00:00:00 2001 From: Alexander Ivanov Date: Fri, 1 Sep 2017 14:30:25 +0300 Subject: Update link to Hugo site The http://hugo.spf13.com is unreachable. By the context, the https://gohugo.io will be appropriate.--- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 45ee21f..e318520 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Hyde -Hyde is a brazen two-column [hugo](http://hugo.spf13.com) theme based on the [Jekyll](http://jekyllrb.com) theme of the same name. +Hyde is a brazen two-column [hugo](https://gohugo.io) theme based on the [Jekyll](http://jekyllrb.com) theme of the same name. It pairs a prominent sidebar with uncomplicated content. ![Hyde screenshot](https://f.cloud.github.com/assets/98681/1831228/42af6c6a-7384-11e3-98fb-e0b923ee0468.png) -- cgit 1.4.1 From eab1974019b3d82cb76cb806ba059fb6cc196111 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 7 Sep 2017 21:52:10 +0200 Subject: Switch to Hugo's built-in Disqus template --- README.md | 11 +++-------- layouts/_default/single.html | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index e318520..41f2d5e 100644 --- a/README.md +++ b/README.md @@ -119,19 +119,14 @@ params: ### Disqus -You can optionally enable a comment system powered by Disqus for the posts. Simply add the variable `disqusShortname` to the `params` in 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 -[params] - disqusShortname = "spf13" +disqusShortname = "spf13" ``` -**YAML** -```yaml -params: - disqusShortname: "spf13" -``` +> **Note:** Previous version 1.0 the Disqus shortname had to be defined inside the `[params]` block. ## Author **Mark Otto** diff --git a/layouts/_default/single.html b/layouts/_default/single.html index c5fdbc2..a9f5d33 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,8 +5,8 @@ {{ .Content }} -{{ if .Site.Params.disqusShortname -}} +{{ if .Site.DisqusShortname -}}

Comments

- +{{ template "_internal/disqus.html" . }} {{- end }} {{- 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 'README.md') 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 From 804cee4561a05f5723e30e77c07cf6352afee619 Mon Sep 17 00:00:00 2001 From: digitalcraftsman Date: Thu, 7 Sep 2017 21:57:31 +0200 Subject: Add YAML example for Disqus in README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 82660cb..d8cb82c 100644 --- a/README.md +++ b/README.md @@ -127,6 +127,11 @@ You can optionally enable a comment system powered by Disqus for the posts. Simp disqusShortname = "spf13" ``` +**YAML** +```yaml +disqusShortname : spf13 +``` + > **Note:** Previous version 1.0 the Disqus shortname had to be defined inside the `[params]` block. -- cgit 1.4.1