bridgetown-seo-tag 3.0.5 → 4.0.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
  SHA256:
3
- metadata.gz: 434a7baeaaed55a1dbfb3207e73c5cc940d798742e5ae7ee38166afebe1fe214
4
- data.tar.gz: 7752c39c3f9663be1ca499534002253110fac0a4491d2b303385d6021a0dabb0
3
+ metadata.gz: ff4c1b2db4c7aff61742d23ffcf023f2bd52092952e3b6c0d3af2a49e3990b2f
4
+ data.tar.gz: 7a4cbaa616f17f53c0c5868f3d950cb39e1cd2bcf0cf6d2b90740430ce5a0cc9
5
5
  SHA512:
6
- metadata.gz: 3bfccc8df8575bb4aff81e2ef1a09d0e1a85ad9c3cd2061a39d8cac7eee70f886c77aa5d2d655cea6f3cf7624a5f23d52c8ed90b637accb87661f8b4f64ae269
7
- data.tar.gz: 8cb8348920e0a57da2928b5f43fb27d9d864aa6aadf04d764b280ea39c9620923e6c300edc2d898fd7759a15e4c34b3240358d66325d96b55c085ed11a2fe332
6
+ metadata.gz: 4bfa79c801ea61b5a66d8200b890e55090db444824cc9a2be37eafc3f07f798a5d1786109027cd33946ca4891649a8a4684bec7215f3f99b2c249dadedbf32e1
7
+ data.tar.gz: f64e6d25f016aec3e687ee38f9d6f9d88dc59027b5bb1bfff6ee595703c7f65413ebffe6ff1693b85ad1fafeb126b99b69d33af393a9ff5518f058b87f50ed5b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # master
2
2
 
3
+ ## 4.0.0 / 2021-04-17
4
+
5
+ * New release with helper to support Ruby templates like ERB
6
+
3
7
  ## 3.0.5 / 2020-06-18
4
8
 
5
9
  * Final release
data/README.md CHANGED
@@ -30,6 +30,14 @@ Or if you wish to control your HTML `<title>` tag yourself:
30
30
  {% seo title=false %}
31
31
  ```
32
32
 
33
+ You can use the `seo` helper in Ruby templates as well:
34
+
35
+ ```erb
36
+ <%= seo %>
37
+ <!-- or -->
38
+ <%= seo title: false %>
39
+ ```
40
+
33
41
  ## Summary
34
42
 
35
43
  Bridgetown SEO Tag adds the following meta tags to your site:
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features)/!) }
17
17
  spec.require_paths = ["lib"]
18
18
 
19
- spec.add_dependency "bridgetown", ">= 0.15.0", "< 2.0"
19
+ spec.add_dependency "bridgetown", ">= 0.20.0", "< 2.0"
20
20
 
21
21
  spec.add_development_dependency "bundler", ">= 1.15"
22
22
  spec.add_development_dependency "html-proofer", "~> 3.7"
@@ -96,3 +96,5 @@ module Bridgetown
96
96
  end
97
97
 
98
98
  Liquid::Template.register_tag("seo", Bridgetown::SeoTag)
99
+
100
+ require "bridgetown-seo-tag/builder"
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bridgetown
4
+ class SeoTag
5
+ class Builder < Bridgetown::Builder
6
+ def build
7
+ helper "seo", helpers_scope: true do |title: true|
8
+ context = Liquid::Context.new({}, {}, { site: site, page: view.page })
9
+ tag_output = Liquid::Template.parse(
10
+ "{% seo #{"title=false" unless title} %}"
11
+ ).render!(context, {})
12
+ tag_output.respond_to?(:html_safe) ? tag_output.html_safe : tag_output
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+
19
+ Bridgetown::SeoTag::Builder.register
@@ -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.5"
8
+ VERSION = "4.0.0"
9
9
  end
10
10
  end
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.5
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-18 00:00:00.000000000 Z
11
+ date: 2021-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridgetown
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.15.0
19
+ version: 0.20.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 0.15.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
@@ -118,6 +118,7 @@ files:
118
118
  - bridgetown-seo-tag.gemspec
119
119
  - lib/bridgetown-seo-tag.rb
120
120
  - lib/bridgetown-seo-tag/author_drop.rb
121
+ - lib/bridgetown-seo-tag/builder.rb
121
122
  - lib/bridgetown-seo-tag/drop.rb
122
123
  - lib/bridgetown-seo-tag/filters.rb
123
124
  - lib/bridgetown-seo-tag/image_drop.rb
@@ -143,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
144
  - !ruby/object:Gem::Version
144
145
  version: '0'
145
146
  requirements: []
146
- rubygems_version: 3.0.6
147
+ rubygems_version: 3.1.2
147
148
  signing_key:
148
149
  specification_version: 4
149
150
  summary: A Bridgetown plugin to add metadata tags for search engines and social networks