Skip to content

Commit

Permalink
Add Support for Google Analytics and SEO
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Prodinger <[email protected]>
  • Loading branch information
Dominik Prodinger committed Oct 3, 2018
1 parent 4eac3f4 commit 8eab530
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 6 additions & 10 deletions _includes/head.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% if page.title == "Home" %}
<meta name="description" content="{{ site.description }}">
{% endif %}

<title>
{% if page.title == "Home" %}
{{ site.title }}
{% else %}
{{ page.title }} &middot; {{ site.title }}
{% endif %}
</title>
{% seo %}

<!-- CSS -->
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
Expand All @@ -24,4 +15,9 @@

<!-- RSS -->
{% feed_meta %}

<!-- Google Analytics-->
{% if site.google_analytics and jekyll.environment == 'production' %}
{% include analytics.html %}
{% endif %}
</head>

0 comments on commit 8eab530

Please sign in to comment.