From 8eab53037052cc9462026729609ef62bb0ad9cdb Mon Sep 17 00:00:00 2001 From: Dominik Prodinger Date: Wed, 3 Oct 2018 09:29:50 +0200 Subject: [PATCH] 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 454c970..f14083c 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 41789c6..6e7d61d 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 %}