jekyll-seo-tag 2.2.2 → 2.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '026698a5195b405a9a4c48b49e002f648d19c7bd'
4
- data.tar.gz: d7a9f7ed597cd9d708f0354f2334a5fc424ba9b1
3
+ metadata.gz: 8b844bd7fdb4699fbbb7cd83e5c1e85f21f57c99
4
+ data.tar.gz: 6331b2bca4a5a48b8d5566ea7fb747f7a9765016
5
5
  SHA512:
6
- metadata.gz: 5eb1720decf7faf0eaff8d1550637ac54a1321303fd08ca0dda2685d6f70ef8a44a1707992b9e8f63061efa6cc563f1b09d7db2db9ca16d3091f74716846def6
7
- data.tar.gz: ecfa02bf252edf0ab07c23d8995bb8f4478879bb6426619e1091fdb1d400349b044375cb8d9af844b0ce382120a825e907466e27f031cf5817a00ca169d429d7
6
+ metadata.gz: c6e5d187d67553021fbf2270323fad748d10da302816ed68d6099bc17db2a0d4712643ca9e38b5c02ed7a268fb03d2296fa47d32cb70c07fb402b6dfa7fc6d8b
7
+ data.tar.gz: 134e65c286346234426d1298645d4d4cdbd331a41aafd631bf7aa8707141511416f384502fe3cf8cd5881ec5814c817fb8291bde8cfc9146e3b496fe71edde39
@@ -1,5 +1,8 @@
1
1
  ## HEAD
2
2
 
3
+ * Guard against the author's Twitter handle being Nil when stripping @'s #203
4
+ * Guard against empty title or description strings #206
5
+
3
6
  ## 2.2.2
4
7
 
5
8
  ### Minor Enhancements
@@ -31,18 +31,22 @@ module Jekyll
31
31
  @site_title ||= format_string(site["title"] || site["name"])
32
32
  end
33
33
 
34
+ def site_description
35
+ @site_description ||= format_string site["description"]
36
+ end
37
+
34
38
  # Page title without site title or description appended
35
39
  def page_title
36
- @page_title ||= format_string(page["title"] || site_title)
40
+ @page_title ||= format_string(page["title"]) || site_title
37
41
  end
38
42
 
39
43
  # Page title with site title or description appended
40
44
  def title
41
45
  @title ||= begin
42
- if page["title"] && site_title
46
+ if site_title && page_title != site_title
43
47
  page_title + TITLE_SEPARATOR + site_title
44
- elsif site["description"] && site_title
45
- site_title + TITLE_SEPARATOR + format_string(site["description"])
48
+ elsif site_description && site_title
49
+ site_title + TITLE_SEPARATOR + site_description
46
50
  else
47
51
  page_title || site_title
48
52
  end
@@ -58,14 +62,14 @@ module Jekyll
58
62
  elsif site_social["name"]
59
63
  format_string site_social["name"]
60
64
  elsif site_title
61
- format_string site_title
65
+ site_title
62
66
  end
63
67
  end
64
68
 
65
69
  def description
66
- @description ||= format_string(
67
- page["description"] || page["excerpt"] || site["description"]
68
- )
70
+ @description ||= begin
71
+ format_string(page["description"] || page["excerpt"]) || site_description
72
+ end
69
73
  end
70
74
 
71
75
  # Returns a nil or a hash representing the author
@@ -88,7 +92,7 @@ module Jekyll
88
92
  end
89
93
 
90
94
  author["twitter"] ||= author["name"]
91
- author["twitter"].delete! "@"
95
+ author["twitter"].delete! "@" if author["twitter"]
92
96
  author.to_liquid
93
97
  end
94
98
  end
@@ -3,6 +3,6 @@ module Liquid; class Tag; end; end
3
3
 
4
4
  module Jekyll
5
5
  class SeoTag < Liquid::Tag
6
- VERSION = "2.2.2".freeze
6
+ VERSION = "2.2.3".freeze
7
7
  end
8
8
  end
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.2.2
4
+ version: 2.2.3
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-05-01 00:00:00.000000000 Z
11
+ date: 2017-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll