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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -0
- data/bridgetown-seo-tag.gemspec +1 -1
- data/lib/bridgetown-seo-tag.rb +2 -0
- data/lib/bridgetown-seo-tag/builder.rb +19 -0
- data/lib/bridgetown-seo-tag/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff4c1b2db4c7aff61742d23ffcf023f2bd52092952e3b6c0d3af2a49e3990b2f
|
4
|
+
data.tar.gz: 7a4cbaa616f17f53c0c5868f3d950cb39e1cd2bcf0cf6d2b90740430ce5a0cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bfa79c801ea61b5a66d8200b890e55090db444824cc9a2be37eafc3f07f798a5d1786109027cd33946ca4891649a8a4684bec7215f3f99b2c249dadedbf32e1
|
7
|
+
data.tar.gz: f64e6d25f016aec3e687ee38f9d6f9d88dc59027b5bb1bfff6ee595703c7f65413ebffe6ff1693b85ad1fafeb126b99b69d33af393a9ff5518f058b87f50ed5b
|
data/CHANGELOG.md
CHANGED
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:
|
data/bridgetown-seo-tag.gemspec
CHANGED
@@ -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.
|
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"
|
data/lib/bridgetown-seo-tag.rb
CHANGED
@@ -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
|
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:
|
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:
|
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.
|
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.
|
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.
|
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
|