Skip to content

Commit e23cde0

Browse files
author
Josh Habdas
committed
Integrate Jekyll SEO Tag
1 parent 912b3cd commit e23cde0

File tree

14 files changed

+97
-124
lines changed

14 files changed

+97
-124
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ group :jekyll_plugins do
66
gem 'jekyll-gist'
77
gem 'jekyll-paginate'
88
gem "jekyll-asciidoc"
9+
gem 'jekyll-seo-tag', '2.1.0' # See TODOs in _head.html when upgrading
910
end
1011

1112
gem 'asciidoctor', '~> 1.5.4'
1213
gem 'coderay', '1.1.1'
13-

Gemfile.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ GEM
2929
jekyll-paginate (1.1.0)
3030
jekyll-sass-converter (1.5.0)
3131
sass (~> 3.4)
32+
jekyll-seo-tag (2.1.0)
33+
jekyll (~> 3.3)
3234
jekyll-watch (1.5.0)
3335
listen (~> 3.0, < 3.1)
3436
kramdown (1.13.0)
@@ -63,6 +65,7 @@ DEPENDENCIES
6365
jekyll-asciidoc
6466
jekyll-gist
6567
jekyll-paginate
68+
jekyll-seo-tag (= 2.1.0)
6669

6770
BUNDLED WITH
6871
1.13.6

_config.yml

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ gems:
4949
- jekyll-asciidoc
5050
- jekyll-gist
5151
- jekyll-paginate
52+
- jekyll-seo-tag
5253

5354

5455
# ____ _ __ _
@@ -140,14 +141,24 @@ defaults:
140141
# / ___// ____/ __ \
141142
# \__ \/ __/ / / / /
142143
# ___/ / /___/ /_/ /
143-
# /____/_____/\____/ Verify Website to Webmaster Tools
144+
# /____/_____/\____/ Settings for the jekyll-seo-tag gem
145+
# More information » https://github.com/jekyll/jekyll-seo-tag/
146+
147+
twitter:
148+
username: phlow
149+
150+
# See also > _data/socialmedia.yml
151+
social:
152+
name: Phlow
153+
links:
154+
- http://twitter.com/phlow
155+
- http://www.mixcloud.com/phlow/
156+
- https://plus.google.com/+Phlow
157+
- https://github.com/Phlow/
158+
- http://www.youtube.com/PhlowMedia
144159

145-
google_author: 'https://plus.google.com/u/0/118311555303973066167'
146160
google_site_verification: 'Vk0IOJ2jwG_qEoG7fuEXYqv0m2rLa8P778Fi_GrsgEQ'
147-
bing_webmastertools_id: '0FB4C028ABCF07C908C54386ABD2D97F'
148-
# alexa_verify_id: ''
149-
150-
161+
# Note: Support coming for Bing, Yandex and Alexa in jekyll-seo-tag 2.2.0
151162

152163
# ______ _
153164
# / ____/___ __ __(_)________ ____ _____
@@ -170,31 +181,6 @@ msapplication_tileimage: 'msapplication_tileimage.png'
170181
msapplication_tilecolor: '#fabb00'
171182

172183

173-
# ______ __ __
174-
# / ____/___ _________ / /_ ____ ____ / /__
175-
# / /_ / __ `/ ___/ _ \/ __ \/ __ \/ __ \/ //_/
176-
# / __/ / /_/ / /__/ __/ /_/ / /_/ / /_/ / ,<
177-
# /_/ \__,_/\___/\___/_.___/\____/\____/_/|_| Facebook-Optimization › http://j.mp/fb_optimize
178-
179-
og_image: 'http://images.phlow.de/phlow/phlow_de-logo-512x.png'
180-
og_locale: 'en_EN'
181-
og_type: 'website'
182-
183-
184-
# _____ _ __ __ ___ ___
185-
# / ___/____ _____(_)___ _/ / / |/ /__ ____/ (_)___ _
186-
# \__ \/ __ \/ ___/ / __ `/ / / /|_/ / _ \/ __ / / __ `/
187-
# ___/ / /_/ / /__/ / /_/ / / / / / / __/ /_/ / / /_/ /
188-
# /____/\____/\___/_/\__,_/_/ /_/ /_/\___/\__,_/_/\__,_/
189-
#
190-
# Open _data/socialmedia.yml to adjust the left and right topbar navigation
191-
#
192-
193-
socialmedia:
194-
twitter: phlow
195-
facebook: phlow.media
196-
197-
198184
# ____ _
199185
# / __ \(_)________ ___ _______
200186
# / / / / / ___/ __ `/ / / / ___/

_data/authors.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# Author details
22
#
33
# 1. Edit information below
4-
# 2. Change site author in config.yml
5-
# 3. Change default post/page authors in config.yml
4+
# 2. Change site author in _config.yml
5+
# 3. Change default post/page authors in _config.yml
66
#
77
# Resource › http://blog.sorryapp.com/blogging-with-jekyll/2014/02/06/adding-authors-to-your-jekyll-site.html
8+
89
phlow: # replace this with your info
910
name: "Phlow"
1011
siterole: "webmaster, developer, copywriter, designer"
1112
uri: http://phlow.de/
1213
email:
1314
twitter: "@phlow"
14-
# you can add more authors here
15+
facebook: "phlow.media"
16+
google_plus_url: "https://plus.google.com/u/0/+Phlow"
17+
18+
# Add more authors below

_data/socialmedia.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
class: icon-cloud
1919
title: "Mixe, was sonst?"
2020

21-
- name: Phlow YouTube Google+
22-
url: https://plus.google.com/u/0/+Phlow
21+
- name: Google+
22+
url: https://plus.google.com/+Phlow
2323
class: icon-googleplus
24-
title: "YouTube Google+"
24+
title: "Google+"
2525

2626
# - name: Facebook
2727
# url: http://www.facebook.com/

_drafts/gallery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ image:
2828
#
2929
# Metainformation & Customization
3030
#
31-
meta_description:
31+
description:
3232
permalink:
3333
---
3434

_drafts/page_all_frontmatter.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ subheadline: ""
77
title: ""
88
teaser: ""
99
categories:
10-
-
10+
-
1111
tags:
12-
-
12+
-
1313
#
1414
# Styling
1515
#
@@ -42,18 +42,16 @@ sidebar: left
4242
comments: true
4343
breadcrumb: true
4444
show_meta: false
45-
meta_title: # SEO: Overwrites title in <head> if needed
46-
meta_description:
45+
description:
4746
permalink:
4847
tawkto: true # Enable tawk.to-Service › More › _config.yml
4948
callforaction:
50-
url:
51-
text:
49+
url:
50+
text:
5251
style: alert
5352
#
5453
# This is a nasty hack to make the navigation highlight
5554
# this page as active in the topbar navigation
5655
#
5756
homepage: false
5857
---
59-

_drafts/page_without_image.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ layout: page
66
subheadline: ""
77
title: ""
88
teaser: ""
9-
meta_description:
9+
description:
1010
permalink:
1111
categories:
12-
-
12+
-
1313
tags:
14-
-
14+
-
1515
---

_drafts/post_with_image.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ layout: page
66
subheadline: ""
77
title: ""
88
teaser: ""
9-
meta_description: ""
9+
description: ""
1010
categories:
11-
-
11+
-
1212
tags:
13-
-
13+
-
1414
#
1515
# Styling
1616
#
@@ -33,4 +33,4 @@ image:
3333
[7]: #
3434
[8]: #
3535
[9]: #
36-
[10]: #
36+
[10]: #

_includes/_head.html

Lines changed: 50 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,74 @@
11
{% comment %}
22
#
33
# Liquid variables are created at the top to keep the source DRY and clean.
4-
# Idea by ericcarlisle.com
54
#
65
# Variables › {{ url }} › site.url + site.baseurl
7-
# Variables › {{ description }} › excerpt, page.meta_description, or site.description
8-
# Variables › {{ title }} › page.title
96
#
10-
{% endcomment %}{% capture ignore %}
7+
{% endcomment %}
118

129
{% assign url = site.baseurl | prepend: site.url %}
1310

14-
{% capture description %}{% if page.meta_description %}{{ page.meta_description }}{% elsif page.teaser %}{{ page.teaser }}{% elsif page.excerpt %}{{ page.excerpt }}{% elsif site.description %}{{ site.description }}{% endif %}{% endcapture %}
15-
{% assign description = description | strip_html | escape | strip %}
11+
<meta charset="utf-8">
12+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1613

17-
{% capture title %}{% if page.meta_title %}{{ page.meta_title}}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title | strip_html | strip }}{% endif %}{% endcapture %}
14+
<link rel="stylesheet" type="text/css" href="{{ url }}/assets/css/styles_feeling_responsive.css">
1815

19-
{% assign title = title | strip_html | escape | strip_newlines %}
16+
{% if site.asciidoctor-enabled == true %}
17+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.0/css/font-awesome.min.css">
18+
{% endif %}
2019

21-
{% endcapture %}<meta charset="utf-8">
22-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
23-
<title>{{ title }}</title>
20+
<script src="{{ url }}/assets/js/modernizr.min.js"></script>
2421

25-
<link rel="stylesheet" type="text/css" href="{{ url }}/assets/css/styles_feeling_responsive.css">
22+
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js"></script>
23+
<script>
24+
WebFont.load({
25+
google: {
26+
families: [ 'Lato:400,700,400italic:latin', 'Volkhov::latin' ]
27+
}
28+
});
29+
</script>
2630

27-
{% if site.asciidoctor-enabled == true %}
28-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.0/css/font-awesome.min.css">
29-
{% endif %}
31+
<noscript>
32+
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic%7CVolkhov' rel='stylesheet' type='text/css'>
33+
</noscript>
3034

31-
<script src="{{ url }}/assets/js/modernizr.min.js"></script>
35+
<!-- Search Engine Optimization -->
36+
{% if page.noindex == true or layout.noindex == true %}<meta name="robots" content="noindex">{% endif %}
3237

33-
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.5.18/webfont.js"></script>
34-
<script>
35-
WebFont.load({
36-
google: {
37-
families: [ 'Lato:400,700,400italic:latin', 'Volkhov::latin' ]
38-
}
39-
});
40-
</script>
38+
{% seo %}
4139

42-
<noscript>
43-
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic%7CVolkhov' rel='stylesheet' type='text/css'>
44-
</noscript>
40+
{% comment %} TODO: Refactor when https://github.com/jekyll/jekyll-seo-tag/pull/148 lands in 2.2.0 {% endcomment %}
41+
{% if site.bing_webmastertools_id %}<meta name="msvalidate.01" content="{{ site.bing_webmastertools_id }}" >{% endif %}
42+
{% if site.yandex_site_verification %}<meta name="yandex-verification" content="{{ site.yandex_site_verification }}">{% endif %}
43+
{% if site.alexa_verify_id %}<meta name="alexaVerifyID" content="{{ site.alexa_verify_id }}">{% endif %}
4544

45+
{% comment %} TODO: Refactor image usage for jekyll-seo-tag {% endcomment %}
46+
{% if page.image.title %}<meta property="og:image" content="{{ site.urlimg }}{{ page.image.title }}">{% endif %}
47+
{% if page.image.title %}<meta name="twitter:image" content="{{ site.urlimg }}{{ page.image.title }}">{% endif %}
4648

47-
<!-- Search Engine Optimization -->
48-
<meta name="description" content="{{ description }}">
49-
{% if site.google_site_verification %}<meta name="google-site-verification" content="{{ site.google_site_verification}}">{% endif %}
50-
{% if site.bing_webmastertools_id %}<meta name="msvalidate.01" content="{{ site.bing_webmastertools_id }}" >{% endif %}
51-
{% if site.google_author %}<link rel="author" href="{{ site.google_author }}">{% endif %}
52-
{% if site.alexa_verify_id %}<meta name="alexaVerifyID" content="{{ site.alexa_verify_id }}">{% endif %}
53-
{% if page.noindex == true or layout.noindex == true %}<meta name="robots" content="noindex">{% endif %}
54-
<link rel="canonical" href="{{ url }}{{ page.url }}">
49+
{% assign seo_author = page.author | default: page.authors[0] | default: site.author %}
50+
{% if site.data.authors[seo_author] %}
51+
{% assign seo_author_name = site.data.authors[seo_author].name %}
52+
{% assign seo_author_google_plus_url = site.data.authors[seo_author].google_plus_url %}
53+
{% assign seo_author_facebook_user = site.data.authors[seo_author].facebook %}
54+
{% endif %}
5555

56+
{% comment %} TODO: Refactor when https://github.com/jekyll/jekyll-seo-tag/issues/96 is resolved {% endcomment %}
57+
{% if seo_author_name %}<meta name="author" content="{{ seo_author_name }}" />{% endif %}
58+
{% if seo_author_google_plus_url %}<link rel="author" href="{{ seo_author_google_plus_url }}">{% endif %}
59+
{% comment %} TODO: Refactor when https://github.com/jekyll/jekyll-seo-tag/issues/155 is resolved {% endcomment %}
60+
{% if seo_author_facebook_user %}<meta property="article:author" content="https://www.facebook.com/{{ seo_author_facebook_user }}">{% endif %}
5661

57-
<!-- Facebook Open Graph -->
58-
<meta property="og:title" content="{{ title }}">
59-
<meta property="og:description" content="{{ description }}">
60-
<meta property="og:url" content="{{ url }}{{ page.url }}">
61-
<meta property="og:locale" content="{% if site.og_locale == nil %}en_EN{% else %}{{ site.og_locale }}{% endif %}">
62-
<meta property="og:type" content="website">
63-
<meta property="og:site_name" content="{{ site.title }}">
64-
{% if page.image.title %}<meta property="og:image" content="{{ site.urlimg }}{{ page.image.title }}">{% endif %}
65-
{% if site.socialmedia.facebook %}<meta property="article:author" content="https://www.facebook.com/{{ site.socialmedia.facebook }}">{% endif %}
62+
<link type="text/plain" rel="author" href="{{ url}}/humans.txt">
6663

64+
{% if page.mediaplayer == true %}
65+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
66+
<script src="{{ url }}/assets/mediaelement_js/mediaelement-and-player.min.js"></script>
67+
<link rel="stylesheet" href="{{ url }}/assets/mediaelement_js/mediaelementplayer.min.css">
68+
{% endif %}
6769

68-
{% if site.socialmedia.twitter %}
69-
<!-- Twitter -->
70-
<meta name="twitter:card" content="summary">
71-
<meta name="twitter:site" content="{{ site.socialmedia.twitter }}">
72-
<meta name="twitter:creator" content="{{ site.socialmedia.twitter }}">
73-
<meta name="twitter:title" content="{{ title }}">
74-
<meta name="twitter:description" content="{{ description }}">
75-
{% if page.image.title %}<meta name="twitter:image" content="{{ site.urlimg }}{{ page.image.title }}">{% endif %}
76-
{% endif %}
70+
{% include _favicon.html %}
7771

78-
<link type="text/plain" rel="author" href="{{ url}}/humans.txt">
79-
80-
{% if page.mediaplayer == true %}
81-
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
82-
<script src="{{ url }}/assets/mediaelement_js/mediaelement-and-player.min.js"></script>
83-
<link rel="stylesheet" href="{{ url }}/assets/mediaelement_js/mediaelementplayer.min.css">
84-
{% endif %}
85-
86-
{% include _favicon.html %}
87-
88-
{% unless page.style == NULL %}
89-
<style type="text/css">{{ page.style }}</style>
90-
{% endunless %}
72+
{% unless page.style == NULL %}
73+
<style type="text/css">{{ page.style }}</style>
74+
{% endunless %}

0 commit comments

Comments
 (0)