jekyll-seo-tag 2.3.0 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa7625108b352ef1b563698519ba698b591efdde
4
- data.tar.gz: 1fd0e7b6a24d046e81ad0265738aa9687cdca1db
3
+ metadata.gz: 2228c5b86fbff03b257d705f372337ff4efc9484
4
+ data.tar.gz: 0aab240d866dba1da02d1be3f6c103131d0263a8
5
5
  SHA512:
6
- metadata.gz: a0f5cc15eba20e905955a1095ece08f87b74150b928be795934e5a6a67aea09463ffdf2b66176ac39d7948cfb07f65676ddede3ccb86bcc6bfc2e1c1a758c28c
7
- data.tar.gz: 79bd26c6530690c2b886d5ba66c0b97607bb979d0cd181061222ad1c120fddf9b53b2fa104a27740042e7bd49851620654db34c4db77e207d1e18fe2310b1134
6
+ metadata.gz: 3f24c19c1cf505c2697ab1e41a70c69fbd2a6a37a4a4348248955807f9f6e95a9db1b1c60ab91567fbd2a904ec1867652be529aa8816419b53387462fb3fc680
7
+ data.tar.gz: 6a69a9471ad6e287939308638a67e73657fd3d9445a6ad6a22be3a884edd9b0d3a7ae808185cfcf71df343a62e6e530d0edfaaf87123aef8b176abe9da0f2fd7
@@ -10,16 +10,11 @@ Metrics/BlockLength:
10
10
  Exclude:
11
11
  - spec/**/*
12
12
 
13
- Style/Documentation:
14
- Enabled: false
15
-
16
- Style/FileName:
17
- Enabled: false
18
-
19
- Style/IndentHeredoc:
13
+ Layout/IndentHeredoc:
20
14
  Exclude:
21
15
  - spec/**/*
22
16
 
23
17
  AllCops:
18
+ TargetRubyVersion: 2.1
24
19
  Exclude:
25
20
  - vendor/**/*
@@ -1,7 +1,14 @@
1
1
  rvm:
2
- - 2.2.3
2
+ - 2.1
3
+ - 2.2
4
+ - 2.3
5
+ - 2.4
3
6
  before_install: gem install bundler
4
7
  language: ruby
5
8
  script: script/cibuild
6
9
  sudo: false
7
10
  cache: bundler
11
+
12
+ env:
13
+ global:
14
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  gemspec
@@ -1,40 +1,57 @@
1
1
  ## HEAD
2
2
 
3
+ ## 2.4.0 / 2017-12-04
4
+
5
+ ### Minor
6
+
7
+ * Add meta generator (#236)
8
+ * Consistently use self-closing tags (#246)
9
+ * Strip null values from JSON-LD hash (#249)
10
+
11
+ ### Documentation
12
+
13
+ * Avoid deprecation warning when building docs (#243)
14
+
15
+ ### Development Fixes
16
+
17
+ * Test against latest Rubies (#242)
18
+ * Use Nokigiri on CI (#181)
19
+
3
20
  ## 2.3.0
4
21
 
5
22
  ### Minor Enhancements
6
23
 
7
- * Use canonical_url specified in page if present #211
8
- * Fix for image.path causing an invalid url error #228
9
- * Ensure `site.data.authors` is properly formatted before attempting to retrieve author meta #227
10
- * Convert author, image, and JSON-LD to dedicated drops #229
11
- * Cache parsed template #231
12
- * Define path with `__dir__` #232
24
+ * Use canonical_url specified in page if present #211
25
+ * Fix for image.path causing an invalid url error #228
26
+ * Ensure `site.data.authors` is properly formatted before attempting to retrieve author meta #227
27
+ * Convert author, image, and JSON-LD to dedicated drops #229
28
+ * Cache parsed template #231
29
+ * Define path with `__dir__` #232
13
30
 
14
31
  ### Documentation
15
32
 
16
- * gems: is deprecated in current Jekyll version of github-pages #230
33
+ * gems: is deprecated in current Jekyll version of github-pages #230
17
34
 
18
- ## 2.2.3
35
+ ## 2.2.3
19
36
 
20
- * Guard against the author's Twitter handle being Nil when stripping @'s #203
21
- * Guard against empty title or description strings #206
37
+ * Guard against the author's Twitter handle being Nil when stripping @'s #203
38
+ * Guard against empty title or description strings #206
22
39
 
23
40
  ## 2.2.2
24
41
 
25
42
  ### Minor Enhancements
26
43
 
27
- * Guard against arrays in subhashes #197
28
- * Guard against invalid or missing URLs #199
44
+ * Guard against arrays in subhashes #197
45
+ * Guard against invalid or missing URLs #199
29
46
 
30
47
  ### Development fixes
31
48
 
32
- * Remove dynamic GitHub Pages logic from Gemfile #194
49
+ * Remove dynamic GitHub Pages logic from Gemfile #194
33
50
 
34
51
  ## 2.2.1
35
52
 
36
- * Convert template logic to a Liquid Drop (significant performance improvement) (#184)
37
- * Fix for JSON-LD validation warning for images missing required properties (#183)
53
+ * Convert template logic to a Liquid Drop (significant performance improvement) (#184)
54
+ * Fix for JSON-LD validation warning for images missing required properties (#183)
38
55
 
39
56
  ## 2.2.0
40
57
 
@@ -44,7 +61,7 @@
44
61
  * Add og:locale support #166
45
62
  * Add support for Bing and Yandex webmaster tools. Closes #147 (#148)
46
63
  * Add SEO author and date modified to validate JSON-LD output (#151)
47
-
64
+
48
65
  ### Minor Enhancements
49
66
 
50
67
  * Use `|` for title separator (#162)
@@ -3,7 +3,7 @@ description: A Jekyll plugin to add metadata tags for search engines and social
3
3
 
4
4
  permalink: pretty
5
5
 
6
- gems:
6
+ plugins:
7
7
  - jekyll-seo-tag
8
8
  - jekyll-sitemap
9
9
 
@@ -1,4 +1,4 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
@@ -27,8 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.require_paths = ["lib"]
28
28
 
29
29
  spec.add_dependency "jekyll", "~> 3.3"
30
- spec.add_development_dependency "bundler", "~> 1.14"
30
+ spec.add_development_dependency "bundler", "~> 1.15"
31
+ spec.add_development_dependency "html-proofer", "~> 3.7"
31
32
  spec.add_development_dependency "rspec", "~> 3.5"
32
- spec.add_development_dependency "html-proofer", "~> 3.6"
33
- spec.add_development_dependency "rubocop", "~> 0.48"
33
+ spec.add_development_dependency "rubocop", "~> 0.5"
34
34
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "jekyll"
2
4
  require "jekyll-seo-tag/version"
3
5
 
@@ -44,12 +46,12 @@ module Jekyll
44
46
  end
45
47
 
46
48
  def payload
47
- {
49
+ # site_payload is an instance of UnifiedPayloadDrop. See https://git.io/v5ajm
50
+ Jekyll::Utils.deep_merge_hashes(context.registers[:site].site_payload, {
48
51
  "page" => context.registers[:page],
49
- "site" => context.registers[:site].site_payload["site"],
50
52
  "paginator" => context["paginator"],
51
53
  "seo_tag" => drop,
52
- }
54
+ })
53
55
  end
54
56
 
55
57
  def drop
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  # A drop representing the current page's author
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  class Drop < Jekyll::Drops::Drop
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  class Filters
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  # A drop representing the page image
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  # This module is deprecated, but is included in the Gem to avoid a breaking
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  class JSONLDDrop < Jekyll::Drops::Drop
@@ -71,6 +73,10 @@ module Jekyll
71
73
  alias_method :mainEntityOfPage, :main_entity
72
74
  private :main_entity
73
75
 
76
+ def to_json
77
+ to_h.reject { |_k, v| v.nil? }.to_json
78
+ end
79
+
74
80
  private
75
81
 
76
82
  attr_reader :page_drop
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  class SeoTag
3
5
  # Mixin to share common URL-related methods between class
@@ -1,8 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Prevent bundler errors
2
4
  module Liquid; class Tag; end; end
3
5
 
4
6
  module Jekyll
5
7
  class SeoTag < Liquid::Tag
6
- VERSION = "2.3.0".freeze
8
+ VERSION = "2.4.0".freeze
7
9
  end
8
10
  end
@@ -3,6 +3,8 @@
3
3
  <title>{{ seo_tag.title }}</title>
4
4
  {% endif %}
5
5
 
6
+ <meta name="generator" content="Jekyll v{{ jekyll.version }}" />
7
+
6
8
  {% if seo_tag.page_title %}
7
9
  <meta property="og:title" content="{{ seo_tag.page_title }}" />
8
10
  {% endif %}
@@ -43,10 +45,10 @@
43
45
  {% endif %}
44
46
 
45
47
  {% if paginator.previous_page %}
46
- <link rel="prev" href="{{ paginator.previous_page_path | absolute_url }}">
48
+ <link rel="prev" href="{{ paginator.previous_page_path | absolute_url }}" />
47
49
  {% endif %}
48
50
  {% if paginator.next_page %}
49
- <link rel="next" href="{{ paginator.next_page_path | absolute_url }}">
51
+ <link rel="next" href="{{ paginator.next_page_path | absolute_url }}" />
50
52
  {% endif %}
51
53
 
52
54
  {% if site.twitter %}
@@ -79,19 +81,19 @@
79
81
 
80
82
  {% if site.webmaster_verifications %}
81
83
  {% if site.webmaster_verifications.google %}
82
- <meta name="google-site-verification" content="{{ site.webmaster_verifications.google }}">
84
+ <meta name="google-site-verification" content="{{ site.webmaster_verifications.google }}" />
83
85
  {% endif %}
84
86
 
85
87
  {% if site.webmaster_verifications.bing %}
86
- <meta name="msvalidate.01" content="{{ site.webmaster_verifications.bing }}">
88
+ <meta name="msvalidate.01" content="{{ site.webmaster_verifications.bing }}" />
87
89
  {% endif %}
88
90
 
89
91
  {% if site.webmaster_verifications.alexa %}
90
- <meta name="alexaVerifyID" content="{{ site.webmaster_verifications.alexa }}">
92
+ <meta name="alexaVerifyID" content="{{ site.webmaster_verifications.alexa }}" />
91
93
  {% endif %}
92
94
 
93
95
  {% if site.webmaster_verifications.yandex %}
94
- <meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex }}">
96
+ <meta name="yandex-verification" content="{{ site.webmaster_verifications.yandex }}" />
95
97
  {% endif %}
96
98
  {% elsif site.google_site_verification %}
97
99
  <meta name="google-site-verification" content="{{ site.google_site_verification }}" />
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.3.0
4
+ version: 2.4.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: 2017-08-24 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -30,56 +30,56 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.14'
33
+ version: '1.15'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.14'
40
+ version: '1.15'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: html-proofer
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.5'
47
+ version: '3.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.5'
54
+ version: '3.7'
55
55
  - !ruby/object:Gem::Dependency
56
- name: html-proofer
56
+ name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.6'
61
+ version: '3.5'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.6'
68
+ version: '3.5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.48'
75
+ version: '0.5'
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: '0.48'
82
+ version: '0.5'
83
83
  description:
84
84
  email:
85
85
  - ben.balter@github.com