jekyll-seo-tag 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +5 -5
- data/.travis.yml +1 -2
- data/History.markdown +20 -1
- data/LICENSE.txt +1 -1
- data/docs/advanced-usage.md +2 -0
- data/docs/installation.md +4 -0
- data/docs/usage.md +14 -7
- data/jekyll-seo-tag.gemspec +3 -1
- data/lib/jekyll-seo-tag/drop.rb +18 -1
- data/lib/jekyll-seo-tag/version.rb +1 -1
- data/lib/template.html +5 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7dfc0385fb69c3aa6632916ea056d33c415170fb0d38fa16acf9310d68d24c01
|
4
|
+
data.tar.gz: 1b0e657d2a3f8da3a9f7f55eba87fec578b59c3979d0930896adc12783fed157
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c106de99699b188a26903bfea3f9916394f8d0c448c487115b3bcaaf46216bfff9bbeffae3b36fd970be4cec3d03feb40989a39fa6a90647fb9a1ee5ef5baf8a
|
7
|
+
data.tar.gz: cb86303b5bf7a62cfb39716fb9957e2bdbc5d118958baea7bf164b8479678629db175961e2f698d436686b9a80662756b6a632c99e39f468d1f70d3ce2e5361b
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
inherit_gem:
|
2
2
|
jekyll: .rubocop.yml
|
3
3
|
|
4
|
+
AllCops:
|
5
|
+
TargetRubyVersion: 2.3
|
6
|
+
Exclude:
|
7
|
+
- vendor/**/*
|
8
|
+
|
4
9
|
Metrics/LineLength:
|
5
10
|
Exclude:
|
6
11
|
- spec/**/*
|
@@ -13,8 +18,3 @@ Metrics/BlockLength:
|
|
13
18
|
Layout/IndentHeredoc:
|
14
19
|
Exclude:
|
15
20
|
- spec/**/*
|
16
|
-
|
17
|
-
AllCops:
|
18
|
-
TargetRubyVersion: 2.1
|
19
|
-
Exclude:
|
20
|
-
- vendor/**/*
|
data/.travis.yml
CHANGED
data/History.markdown
CHANGED
@@ -1,4 +1,23 @@
|
|
1
|
-
##
|
1
|
+
## 2.5.0 / 2018-05-18
|
2
|
+
|
3
|
+
* Docs: Prevent GitHub Pages from processing Liquid raw tag (#276)
|
4
|
+
|
5
|
+
### Documentation
|
6
|
+
|
7
|
+
* Use gems config key for Jekyll < 3.5.0 (#255)
|
8
|
+
* docs/usage - replace "below" with correct link (#280)
|
9
|
+
|
10
|
+
### Development Fixes
|
11
|
+
|
12
|
+
* Test against Ruby 2.5 (#260)
|
13
|
+
* add tests for twitter.card types (#289)
|
14
|
+
* Target Ruby 2.3 and Rubocop 0.56.0 (#292)
|
15
|
+
|
16
|
+
### Minor Enhancements
|
17
|
+
|
18
|
+
* Add webmaster_verifications for baidu (#263)
|
19
|
+
* Include page number in title (#250)
|
20
|
+
* Configure default Twitter summary card type (V2) (#225)
|
2
21
|
|
3
22
|
## 2.4.0 / 2017-12-04
|
4
23
|
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2015 Ben Balter
|
3
|
+
Copyright (c) 2015-present Ben Balter and the jekyll-seo-tag contributors
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/docs/advanced-usage.md
CHANGED
@@ -6,9 +6,11 @@ Jekyll SEO Tag is designed to implement SEO best practices by default and to be
|
|
6
6
|
|
7
7
|
If for some reason, you don't want the plugin to output `<title>` tags on each page, simply invoke the plugin within your template like so:
|
8
8
|
|
9
|
+
<!-- {% raw %} -->
|
9
10
|
```
|
10
11
|
{% seo title=false %}
|
11
12
|
```
|
13
|
+
<!-- {% endraw %} -->
|
12
14
|
|
13
15
|
### Author information
|
14
16
|
|
data/docs/installation.md
CHANGED
@@ -13,8 +13,12 @@
|
|
13
13
|
- jekyll-seo-tag
|
14
14
|
```
|
15
15
|
|
16
|
+
If you are using a Jekyll version less than `3.5.0`, use the `gems` key instead of `plugins`.
|
17
|
+
|
16
18
|
3. Add the following right before `</head>` in your site's template(s):
|
17
19
|
|
20
|
+
<!-- {% raw %} -->
|
18
21
|
```liquid
|
19
22
|
{% seo %}
|
20
23
|
```
|
24
|
+
<!-- {% endraw %} -->
|
data/docs/usage.md
CHANGED
@@ -5,12 +5,16 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|
5
5
|
* `title` - Your site's title (e.g., Ben's awesome site, The GitHub Blog, etc.)
|
6
6
|
* `description` - A short description (e.g., A blog dedicated to reviewing cat gifs)
|
7
7
|
* `url` - The full URL to your site. Note: `site.github.url` will be used by default.
|
8
|
-
* `author` - global author information (see
|
9
|
-
|
8
|
+
* `author` - global author information (see [Advanced usage](advanced-usage.md#author-information))
|
9
|
+
|
10
|
+
* `twitter` - The following properties are available:
|
11
|
+
* `twitter:card` - The site's default card type
|
12
|
+
* `twitter:username` - The site's Twitter handle. You'll want to describe it like so:
|
10
13
|
|
11
14
|
```yml
|
12
15
|
twitter:
|
13
16
|
username: benbalter
|
17
|
+
card: summary
|
14
18
|
```
|
15
19
|
|
16
20
|
* `facebook` - The following properties are available:
|
@@ -20,14 +24,14 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|
20
24
|
|
21
25
|
You'll want to describe one or more like so:
|
22
26
|
|
23
|
-
|
27
|
+
```yml
|
24
28
|
facebook:
|
25
29
|
app_id: 1234
|
26
30
|
publisher: 1234
|
27
31
|
admins: 1234
|
28
|
-
|
32
|
+
```
|
29
33
|
|
30
|
-
* `logo` - URL to a site-wide logo (e.g., `/assets/your-company-logo.png`)
|
34
|
+
* `logo` - URL to a site-wide logo (e.g., `/assets/your-company-logo.png`) - If you would like the "publisher" property to be present, you must add this field to your site's configuration, during the validation of the structured data by Google web master tools, if the `logo` field is not validated, you will find errors inherent to the publisher in the [structured datas test](https://search.google.com/structured-data/testing-tool/u/0/)
|
31
35
|
* `social` - For [specifying social profiles](https://developers.google.com/structured-data/customize/social-profiles). The following properties are available:
|
32
36
|
* `name` - If the user or organization name differs from the site's name
|
33
37
|
* `links` - An array of links to social media profiles.
|
@@ -43,7 +47,7 @@ The SEO tag will respect any of the following if included in your site's `_confi
|
|
43
47
|
- https://plus.google.com/+BenBalter
|
44
48
|
- https://github.com/benbalter
|
45
49
|
- https://keybase.io/benbalter
|
46
|
-
|
50
|
+
```
|
47
51
|
|
48
52
|
* `google_site_verification` for verifying ownership via Google webmaster tools
|
49
53
|
* Alternatively, verify ownership with several services at once using the following format:
|
@@ -54,6 +58,7 @@ webmaster_verifications:
|
|
54
58
|
bing: 1234
|
55
59
|
alexa: 1234
|
56
60
|
yandex: 1234
|
61
|
+
baidu: 1234
|
57
62
|
```
|
58
63
|
|
59
64
|
* `lang` - The locale these tags are marked up in. Of the format `language_TERRITORY`. Default is `en_US`.
|
@@ -63,5 +68,7 @@ The SEO tag will respect the following YAML front matter if included in a post,
|
|
63
68
|
* `title` - The title of the post, page, or document
|
64
69
|
* `description` - A short description of the page's content
|
65
70
|
* `image` - URL to an image associated with the post, page, or document (e.g., `/assets/page-pic.jpg`)
|
66
|
-
* `author` - Page-, post-, or document-specific author information (see
|
71
|
+
* `author` - Page-, post-, or document-specific author information (see [Advanced usage](advanced-usage.md#author-information))
|
67
72
|
* `lang` - Page-, post-, or document-specific language information
|
73
|
+
|
74
|
+
*Note:* Front matter defaults can be used for any of the above values as described in advanced usage with an image example.
|
data/jekyll-seo-tag.gemspec
CHANGED
@@ -21,6 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
22
22
|
end
|
23
23
|
|
24
|
+
spec.required_ruby_version = ">= 2.3.0"
|
25
|
+
|
24
26
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|spec|features)/!) }
|
25
27
|
spec.bindir = "exe"
|
26
28
|
spec.executables = spec.files.grep(%r!^exe/!) { |f| File.basename(f) }
|
@@ -30,5 +32,5 @@ Gem::Specification.new do |spec|
|
|
30
32
|
spec.add_development_dependency "bundler", "~> 1.15"
|
31
33
|
spec.add_development_dependency "html-proofer", "~> 3.7"
|
32
34
|
spec.add_development_dependency "rspec", "~> 3.5"
|
33
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
35
|
+
spec.add_development_dependency "rubocop", "~> 0.56.0"
|
34
36
|
end
|
data/lib/jekyll-seo-tag/drop.rb
CHANGED
@@ -5,7 +5,7 @@ module Jekyll
|
|
5
5
|
class Drop < Jekyll::Drops::Drop
|
6
6
|
include Jekyll::SeoTag::UrlHelper
|
7
7
|
|
8
|
-
TITLE_SEPARATOR = " | "
|
8
|
+
TITLE_SEPARATOR = " | "
|
9
9
|
FORMAT_STRING_METHODS = %i[
|
10
10
|
markdownify strip_html normalize_whitespace escape_once
|
11
11
|
].freeze
|
@@ -53,6 +53,12 @@ module Jekyll
|
|
53
53
|
page_title || site_title
|
54
54
|
end
|
55
55
|
end
|
56
|
+
|
57
|
+
if page_number
|
58
|
+
return page_number + @title
|
59
|
+
end
|
60
|
+
|
61
|
+
@title
|
56
62
|
end
|
57
63
|
|
58
64
|
def name
|
@@ -175,6 +181,17 @@ module Jekyll
|
|
175
181
|
page["url"] =~ HOMEPAGE_OR_ABOUT_REGEX
|
176
182
|
end
|
177
183
|
|
184
|
+
def page_number
|
185
|
+
return unless @context["paginator"] && @context["paginator"]["page"]
|
186
|
+
|
187
|
+
current = @context["paginator"]["page"]
|
188
|
+
total = @context["paginator"]["total_pages"]
|
189
|
+
|
190
|
+
if current > 1
|
191
|
+
return "Page #{current} of #{total} for "
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
178
195
|
attr_reader :context
|
179
196
|
|
180
197
|
def fallback_data
|
data/lib/template.html
CHANGED
@@ -53,7 +53,7 @@
|
|
53
53
|
|
54
54
|
{% if site.twitter %}
|
55
55
|
{% if seo_tag.image %}
|
56
|
-
<meta name="twitter:card" content="summary_large_image" />
|
56
|
+
<meta name="twitter:card" content="{{ page.twitter.card | default: site.twitter.card | default: "summary_large_image" }}" />
|
57
57
|
{% else %}
|
58
58
|
<meta name="twitter:card" content="summary" />
|
59
59
|
{% endif %}
|
@@ -95,6 +95,10 @@
|
|
95
95
|
{% if site.webmaster_verifications.yandex %}
|
96
96
|
<meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex }}" />
|
97
97
|
{% endif %}
|
98
|
+
|
99
|
+
{% if site.webmaster_verifications.baidu %}
|
100
|
+
<meta name="baidu-site-verification" content="{{ site.webmaster_verifications.baidu }}" />
|
101
|
+
{% endif %}
|
98
102
|
{% elsif site.google_site_verification %}
|
99
103
|
<meta name="google-site-verification" content="{{ site.google_site_verification }}" />
|
100
104
|
{% endif %}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-seo-tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 0.56.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 0.56.0
|
83
83
|
description:
|
84
84
|
email:
|
85
85
|
- ben.balter@github.com
|
@@ -128,7 +128,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
131
|
+
version: 2.3.0
|
132
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
133
|
requirements:
|
134
134
|
- - ">="
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
138
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.6
|
139
|
+
rubygems_version: 2.7.6
|
140
140
|
signing_key:
|
141
141
|
specification_version: 4
|
142
142
|
summary: A Jekyll plugin to add metadata tags for search engines and social networks
|