bridgetown-seo-tag 3.0.2 → 3.0.3

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
  SHA256:
3
- metadata.gz: 9a69aa5dfea8921df56935c8a5c109ac28e07beb3f7c222efc6b08768423b82b
4
- data.tar.gz: ec35cb8554ca7f02dff2d10bde9a2e9dc92dbed657e19e022ba550be8124d159
3
+ metadata.gz: 19e8233a77aad3796aeb8b05d8a675413be603db165753b3c3ce0d83cd20b042
4
+ data.tar.gz: 5da4c3c8af5cd303d7a84848600e571d5b21ad97aa8c06f837458db2e74bbec2
5
5
  SHA512:
6
- metadata.gz: 630e8a49854c0b91436fab5ef2a0621a77ec2c1c2d9c7c09918469a464dcbb6af3860107aad10bf7ebf33b1d3f91bf560bb50acd12d47f8b59d8f060b015574a
7
- data.tar.gz: 18185c1b8d4e8d6f690927c2df7238ec450aca247b405d953eac5032352388040fe054f37ae69274cea7d9e21254cd0c9164aa1985f17b414475eec127d6baa3
6
+ metadata.gz: 939f24dc652310da83407866d9ea32e1e024acaa745be7889bb2887d68832e7441b5cefd933ed49f3ea0a0c6fbadf9ca665db033399a6fe2751a8159b83dd881
7
+ data.tar.gz: b3e987f8caf569e358e68a343832b19447294be8a80b63482b27a6d8156ebeaac098fb2e14ddb02f536ecf9a6a1aecd08526f3a4d0bc636806b04ec2d1fad845
data/.rubocop.yml CHANGED
@@ -14,6 +14,6 @@ Layout/LineLength:
14
14
  - spec/**/*
15
15
  - bridgetown-seo-tag.gemspec
16
16
 
17
- Layout/BlockLength:
17
+ Metrics/BlockLength:
18
18
  Exclude:
19
19
  - spec/**/*
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.6.4@bridgetown-gems
data/History.markdown CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.0.3 / 2020-04-19
4
+
5
+ Allow `site.metadata.twitter` data if present. Look for `page.subtitle` if
6
+ `page.description` isn't present.
7
+
3
8
  ## 3.0.0 / 2020-04-14
4
9
 
5
10
  Use Bridgetown gem and rename to bridgetown-seo-tag.
data/README.md CHANGED
@@ -4,6 +4,26 @@ A Bridgetown plugin to add metadata tags for search engines and social networks
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/bridgetown-seo-tag.svg)](https://badge.fury.io/rb/bridgetown-seo-tag)
6
6
 
7
+ ## Installation
8
+
9
+ Run this command to add this plugin to your site's Gemfile:
10
+
11
+ ```shell
12
+ $ bundle add bridgetown-seo-tag -g bridgetown_plugins
13
+ ```
14
+
15
+ Or simply add this line to your Gemfile:
16
+
17
+ ```ruby
18
+ gem 'bridgetown-seo-tag', group: "bridgetown_plugins"
19
+ ```
20
+
21
+ And then add the Liquid tag to your HTML head:
22
+
23
+ ```liquid
24
+ {% seo %}
25
+ ```
26
+
7
27
  ## What it does
8
28
 
9
29
  Bridgetown SEO Tag adds the following meta tags to your site:
@@ -13,9 +13,7 @@ Gem::Specification.new do |spec|
13
13
 
14
14
  spec.required_ruby_version = ">= 2.4.0"
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|spec|features)/!) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r!^exe/!) { |f| File.basename(f) }
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features)/!) }
19
17
  spec.require_paths = ["lib"]
20
18
 
21
19
  spec.add_dependency "bridgetown", ">= 0.6", "< 2.0"
@@ -89,7 +89,9 @@ module Bridgetown
89
89
 
90
90
  def description
91
91
  @description ||= begin
92
- format_string(page["description"] || page["excerpt"]) || site_description
92
+ format_string(
93
+ page["description"] || page["subtitle"] || page["excerpt"]
94
+ ) || site_description
93
95
  end
94
96
  end
95
97
 
@@ -5,6 +5,6 @@ module Liquid; class Tag; end; end
5
5
 
6
6
  module Bridgetown
7
7
  class SeoTag < Liquid::Tag
8
- VERSION = "3.0.2"
8
+ VERSION = "3.0.3"
9
9
  end
10
10
  end
data/lib/template.html CHANGED
@@ -62,7 +62,7 @@
62
62
  {% endif %}
63
63
 
64
64
  {% if site.metadata.twitter %}
65
- <meta name="twitter:site" content="@{{ site.metadata.twitter.username | remove:'@' }}" />
65
+ <meta name="twitter:site" content="@{{ site.metadata.twitter.username | default: site.metadata.twitter | remove:'@' }}" />
66
66
 
67
67
  {% if seo_tag.author.twitter %}
68
68
  <meta name="twitter:creator" content="@{{ seo_tag.author.twitter | remove:'@' }}" />
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridgetown-seo-tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-14 00:00:00.000000000 Z
11
+ date: 2020-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown
@@ -110,6 +110,7 @@ files:
110
110
  - ".rspec"
111
111
  - ".rubocop.yml"
112
112
  - ".rubocop_todo.yml"
113
+ - ".ruby-version"
113
114
  - Gemfile
114
115
  - History.markdown
115
116
  - LICENSE.txt
@@ -124,11 +125,6 @@ files:
124
125
  - lib/bridgetown-seo-tag/url_helper.rb
125
126
  - lib/bridgetown-seo-tag/version.rb
126
127
  - lib/template.html
127
- - script/bootstrap
128
- - script/cibuild
129
- - script/fmt
130
- - script/release
131
- - script/test
132
128
  homepage: https://github.com/bridgetownrb/bridgetown-seo-tag
133
129
  licenses:
134
130
  - MIT
data/script/bootstrap DELETED
@@ -1,5 +0,0 @@
1
- #!/bin/sh
2
-
3
- set -ex
4
-
5
- bundle install
data/script/cibuild DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/sh
2
-
3
- set -ex
4
-
5
- script/fmt
6
- script/test
data/script/fmt DELETED
@@ -1,10 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
-
4
- echo "Rubocop $(bundle exec rubocop --version)"
5
- bundle exec rubocop -D -E $@
6
- success=$?
7
- if ((success != 0)); then
8
- echo -e "\nTry running \`script/fmt -a\` to automatically fix errors"
9
- fi
10
- exit $success
data/script/release DELETED
@@ -1,7 +0,0 @@
1
- #!/bin/sh
2
- # Tag and push a release.
3
-
4
- set -e
5
-
6
- script/cibuild
7
- bundle exec rake release
data/script/test DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/bash
2
- set -ex
3
-
4
- bundle exec rspec "$@"