meta-tags 2.7.1 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG.md +8 -0
- data/README.md +3 -1
- data/lib/generators/meta_tags/templates/config/initializers/meta_tags.rb +3 -3
- data/lib/meta_tags/configuration.rb +1 -1
- data/lib/meta_tags/meta_tags_collection.rb +25 -7
- data/lib/meta_tags/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c154acfd9aee3e03d552f48a280f283d2b1daf3
|
4
|
+
data.tar.gz: c053a4f2c0eee6dbb7f3a3ee3aae83ea2028247c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f5a3d2473bac40102f8fcd84c86bff95cd9fb740ddc81118da94e4f683e969debebab8069656dea3e6de248163dc6c388d6cdab19f02bd9c97fb8f0151fcc55
|
7
|
+
data.tar.gz: 31468642280f4026434f939e838aa7d2c8e9dc9c6890ac7af5d9fee4f9aad4c624073b07ea5cdd7ec518a74462804268d89ac56b2125d31614b2b5469eb5c891
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 2.8.0 (February 28, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.7.1...v2.8.0)
|
2
|
+
|
3
|
+
Features:
|
4
|
+
- Added noarchive support.
|
5
|
+
|
6
|
+
Changes:
|
7
|
+
- Updated default description size to 300 as a new recommended truncation limit.
|
8
|
+
|
1
9
|
## 2.7.1 (February 1, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.7.0...v2.7.1)
|
2
10
|
|
3
11
|
Changes:
|
data/README.md
CHANGED
@@ -149,6 +149,7 @@ Use these options to customize the title format:
|
|
149
149
|
* `:noindex` — add noindex meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
150
150
|
* `:nofollow` — add nofollow meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
151
151
|
* `:follow` – add follow meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
152
|
+
* `:noarchive` – add noarchive meta tag; when true, 'robots' will be used, otherwise the string will be used;
|
152
153
|
* `:canonical` — add canonical link tag;
|
153
154
|
* `:prev` — add prev link tag;
|
154
155
|
* `:next` — add next link tag;
|
@@ -301,11 +302,12 @@ set_meta_tags description: "All text about keywords, other keywords"
|
|
301
302
|
# <meta name="description" content="All text about keywords, other keywords">
|
302
303
|
```
|
303
304
|
|
304
|
-
Recommended description tag length: up to <b>
|
305
|
+
Recommended description tag length: up to <b>300 characters</b>.
|
305
306
|
|
306
307
|
Further reading:
|
307
308
|
|
308
309
|
* [Meta Description](https://moz.com/learn/seo/meta-description)
|
310
|
+
* [How Long Should Your Meta Description Be? (2018 Edition)](https://moz.com/blog/how-long-should-your-meta-description-be-2018)
|
309
311
|
|
310
312
|
### Keywords
|
311
313
|
|
@@ -7,11 +7,11 @@ MetaTags.configure do |config|
|
|
7
7
|
# When true, site title will be truncated instead of title. Default is false.
|
8
8
|
# config.truncate_site_title_first = false
|
9
9
|
|
10
|
-
# Maximum length of the page description. Default is
|
10
|
+
# Maximum length of the page description. Default is 300.
|
11
11
|
# Set to nil or 0 to remove limits.
|
12
|
-
# config.description_limit =
|
12
|
+
# config.description_limit = 300
|
13
13
|
|
14
|
-
#
|
14
|
+
# Maximum length of the keywords meta tag. Default is 255.
|
15
15
|
# config.keywords_limit = 255
|
16
16
|
|
17
17
|
# Default separator for keywords meta tag (used when an Array passed with
|
@@ -142,13 +142,14 @@ module MetaTags
|
|
142
142
|
nofollow_name, nofollow_value = extract_noindex_attribute(:nofollow)
|
143
143
|
follow_name, follow_value = extract_noindex_attribute(:follow)
|
144
144
|
|
145
|
-
if noindex_name == follow_name && (follow_value && noindex_value)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
145
|
+
noindex_attributes = if noindex_name == follow_name && (follow_value && noindex_value)
|
146
|
+
{ noindex_name => [noindex_value, follow_value].compact.join(', ') }
|
147
|
+
elsif noindex_name == nofollow_name
|
148
|
+
{ noindex_name => [noindex_value, nofollow_value].compact.join(', ') }
|
149
|
+
else
|
150
|
+
{ noindex_name => noindex_value, nofollow_name => nofollow_value }
|
151
|
+
end
|
152
|
+
append_noarchive_attribute noindex_attributes
|
152
153
|
end
|
153
154
|
|
154
155
|
protected
|
@@ -187,5 +188,22 @@ module MetaTags
|
|
187
188
|
|
188
189
|
[ noindex_name, noindex_value ]
|
189
190
|
end
|
191
|
+
|
192
|
+
# Append noarchive attribute if it present.
|
193
|
+
#
|
194
|
+
# @param [Hash<String, String>] noindex noindex attributes.
|
195
|
+
# @return [Hash<String, String>] modified noindex attributes.
|
196
|
+
#
|
197
|
+
def append_noarchive_attribute(noindex)
|
198
|
+
noarchive_name, noarchive_value = extract_noindex_attribute :noarchive
|
199
|
+
if noarchive_value
|
200
|
+
if noindex[noarchive_name].blank?
|
201
|
+
noindex[noarchive_name] = noarchive_value
|
202
|
+
else
|
203
|
+
noindex[noarchive_name] += ", #{noarchive_value}"
|
204
|
+
end
|
205
|
+
end
|
206
|
+
noindex
|
207
|
+
end
|
190
208
|
end
|
191
209
|
end
|
data/lib/meta_tags/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Shteflyuk
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
QwaoNrsQi488Dsk54YiNQWVouzfjRqEa4uUxSyKmRfQp7MNILESAOCXM+wZIxanu
|
31
31
|
C9c9eUxgNTnHhsR3sK0QCIMwtUI=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-03-01 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: actionpack
|
metadata.gz.sig
CHANGED
Binary file
|