From 4eac3f45c587ead3351a6bcfd25eadfeeb9bfe38 Mon Sep 17 00:00:00 2001
From: Dominik Prodinger <35099504+prodingerd@users.noreply.github.com>
Date: Wed, 3 Oct 2018 09:27:20 +0200
Subject: [PATCH 1/4] Add Google Analytics Script
---
_includes/analytics.html | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 _includes/analytics.html
diff --git a/_includes/analytics.html b/_includes/analytics.html
new file mode 100644
index 0000000000..743d1fc2ef
--- /dev/null
+++ b/_includes/analytics.html
@@ -0,0 +1,6 @@
+
+
From 8eab53037052cc9462026729609ef62bb0ad9cdb Mon Sep 17 00:00:00 2001
From: Dominik Prodinger
Date: Wed, 3 Oct 2018 09:29:50 +0200
Subject: [PATCH 2/4] Add Support for Google Analytics and SEO
Signed-off-by: Dominik Prodinger
---
_config.yml | 3 +++
_includes/head.html | 16 ++++++----------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/_config.yml b/_config.yml
index 454c970b98..f14083c296 100644
--- a/_config.yml
+++ b/_config.yml
@@ -4,6 +4,9 @@ description: "Minimal Jekyll theme for storytellers"
baseurl: "/tale"
url: "https://chesterhow.github.io"
+# Google Analytics
+google_analytics: UA—XXXXXXXX-X
+
# Author
author:
name: Chester How
diff --git a/_includes/head.html b/_includes/head.html
index 41789c6f24..6e7d61d927 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -1,17 +1,8 @@
- {% if page.title == "Home" %}
-
- {% endif %}
-
- {% if page.title == "Home" %}
- {{ site.title }}
- {% else %}
- {{ page.title }} · {{ site.title }}
- {% endif %}
-
+ {% seo %}
@@ -24,4 +15,9 @@
{% feed_meta %}
+
+
+ {% if site.google_analytics and jekyll.environment == 'production' %}
+ {% include analytics.html %}
+ {% endif %}
From 098d203731d7770aa0851aa8c7e90e59e57fe5e8 Mon Sep 17 00:00:00 2001
From: Dominik Prodinger
Date: Fri, 5 Oct 2018 10:09:21 +0200
Subject: [PATCH 3/4] Add Jekyll-SEO-Tag Dependency
The "jekyll-seo-tag" gem/plugin is needed for the "{% seo %}" tag to
work on any platform other than GitHub Pages.
Signed-off-by: Dominik Prodinger
---
Gemfile | 2 ++
_config.yml | 1 +
2 files changed, 3 insertions(+)
diff --git a/Gemfile b/Gemfile
index bb94df8293..0e298a949c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,3 +2,5 @@
source "https://rubygems.org"
gemspec
+
+gem 'jekyll-seo-tag'
diff --git a/_config.yml b/_config.yml
index f14083c296..9694bb6861 100644
--- a/_config.yml
+++ b/_config.yml
@@ -25,6 +25,7 @@ sass:
plugins:
- jekyll-feed
- jekyll-paginate
+ - jekyll-seo-tag
# - jemoji #Uncomment this to allow emoji in your post
# Permalinks
From d1659d0b8cfcdf37385a406ea66cd13a8b6e6e54 Mon Sep 17 00:00:00 2001
From: Dominik Prodinger
Date: Sat, 6 Oct 2018 18:53:56 +0200
Subject: [PATCH 4/4] Move Dependency to tale.gemspec File
The "jekyll-seo-tag" gem is now included using the "tale.gemspec" file.
Signed-off-by: Dominik Prodinger
---
Gemfile | 4 +---
tale.gemspec | 1 +
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Gemfile b/Gemfile
index 0e298a949c..0ddf5e36c0 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,6 +1,4 @@
# frozen_string_literal: true
source "https://rubygems.org"
-gemspec
-
-gem 'jekyll-seo-tag'
+gemspec
\ No newline at end of file
diff --git a/tale.gemspec b/tale.gemspec
index 4e5e6d02bb..90f14a2668 100644
--- a/tale.gemspec
+++ b/tale.gemspec
@@ -15,6 +15,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "jekyll", "~> 3.6"
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
spec.add_runtime_dependency "jekyll-feed", "~> 0.10.0"
+ spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.5.0"
spec.add_development_dependency "bundler", "~> 1.12"
spec.add_development_dependency "rake", "~> 10.0"