meta-tags 2.10.0 → 2.14.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 +133 -70
- data/Gemfile +17 -3
- data/README.md +57 -59
- data/Rakefile +10 -0
- data/certs/kpumuk.pem +18 -19
- data/lib/generators/meta_tags/install_generator.rb +3 -1
- data/lib/generators/meta_tags/templates/config/initializers/meta_tags.rb +6 -0
- data/lib/meta-tags.rb +2 -0
- data/lib/meta_tags.rb +3 -6
- data/lib/meta_tags/configuration.rb +7 -0
- data/lib/meta_tags/content_tag.rb +2 -0
- data/lib/meta_tags/controller_helper.rb +6 -4
- data/lib/meta_tags/meta_tags_collection.rb +35 -38
- data/lib/meta_tags/railtie.rb +17 -0
- data/lib/meta_tags/renderer.rb +28 -26
- data/lib/meta_tags/tag.rb +2 -0
- data/lib/meta_tags/text_normalizer.rb +37 -16
- data/lib/meta_tags/version.rb +4 -1
- data/lib/meta_tags/view_helper.rb +17 -11
- data/meta-tags.gemspec +7 -4
- metadata +51 -32
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a5fade8f101dbfec80dc93b0ede2c9c64961497828fa4544fd7b591f889e479
|
4
|
+
data.tar.gz: fb031edc1dc4f16bc286961bc9772f8e9ef34855ce12ad84ae2a3c1306cf0013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1ce2e4321fb30f1a2a95107436e7c31f2b6da89e4979988f80cea5690e720cfc7c05997c08b084991b8a3c69f13a99b44ad60af2455dd9944aede8d6ed3c598
|
7
|
+
data.tar.gz: ddb7aeb1197227116a51d70d08d9921ce1c9d7194b35dda95fccaa09e4b8caf6e67f76f83b9bd5a46f191806572330d4dac0388a8d0068752e42e33acee8bbf9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,229 +1,292 @@
|
|
1
|
+
## 2.14.0 (December 10, 2020) [☰](https://github.com/kpumuk/meta-tags/compare/v2.13.0...v2.14.0)
|
2
|
+
|
3
|
+
Changes:
|
4
|
+
|
5
|
+
- Dropped official support for Rails older than 5.1 and Ruby older than 2.5 (both reached their End of Life)
|
6
|
+
- Added support for Rails 6.1
|
7
|
+
|
8
|
+
Bugfixes:
|
9
|
+
|
10
|
+
- Fixed Rails 6 deprecation warning.
|
11
|
+
|
12
|
+
## 2.13.0 (October 10, 2019) [☰](https://github.com/kpumuk/meta-tags/compare/v2.12.0...v2.13.0)
|
13
|
+
|
14
|
+
Bugfixes:
|
15
|
+
|
16
|
+
- Fixed Rails 6 deprecation warning.
|
17
|
+
|
18
|
+
## 2.12.0 (September 10, 2019) [☰](https://github.com/kpumuk/meta-tags/compare/v2.11.1...v2.12.0)
|
19
|
+
|
20
|
+
Features:
|
21
|
+
|
22
|
+
- Indexing directives (`noindex`, `nofollow`, etc. now support an array of robot names as a value).
|
23
|
+
- Added support for `link[rel='manifest']` ([199](https://github.com/kpumuk/meta-tags/pull/199))
|
24
|
+
|
25
|
+
Bugfixes:
|
26
|
+
|
27
|
+
- When `noindex` uses "robots" as a value, `nofollow` ignores a custom robot name, and switches to "robots" as well
|
28
|
+
|
29
|
+
## 2.11.1 (January 19, 2019) [☰](https://github.com/kpumuk/meta-tags/compare/v2.11.0...v2.11.1)
|
30
|
+
|
31
|
+
Features:
|
32
|
+
|
33
|
+
- Rails 6 is officially supported.
|
34
|
+
|
35
|
+
## 2.11.0 (November 16, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.10.0...v2.11.0)
|
36
|
+
|
37
|
+
Features:
|
38
|
+
|
39
|
+
- Added a configuration option `minify_output` to remove new line characters between meta tags ([182](https://github.com/kpumuk/meta-tags/pull/182))
|
40
|
+
- Title, description, and keywords can be an object responding to `#to_str` ([183](https://github.com/kpumuk/meta-tags/pull/183))
|
41
|
+
|
42
|
+
Bugfixes:
|
43
|
+
|
44
|
+
- Truncate title before escaping HTML characters ([180](https://github.com/kpumuk/meta-tags/pull/180))
|
45
|
+
|
1
46
|
## 2.10.0 (June 8, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.9.0...v2.10.0)
|
2
47
|
|
3
48
|
Features:
|
4
|
-
|
49
|
+
|
50
|
+
- Allow `MetaTagsCollection#update` to receive an object ([169](https://github.com/kpumuk/meta-tags/pull/169))
|
5
51
|
|
6
52
|
## 2.9.0 (March 29, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.8.0...v2.9.0)
|
7
53
|
|
8
54
|
Features:
|
9
|
-
|
55
|
+
|
56
|
+
- Added ability to add `index` robots meta tag (thanks to @rafallo)
|
10
57
|
|
11
58
|
## 2.8.0 (February 28, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.7.1...v2.8.0)
|
12
59
|
|
13
60
|
Features:
|
14
|
-
|
61
|
+
|
62
|
+
- Added noarchive support.
|
15
63
|
|
16
64
|
Changes:
|
17
|
-
|
65
|
+
|
66
|
+
- Updated default description size to 300 as a new recommended truncation limit.
|
18
67
|
|
19
68
|
## 2.7.1 (February 1, 2018) [☰](https://github.com/kpumuk/meta-tags/compare/v2.7.0...v2.7.1)
|
20
69
|
|
21
70
|
Changes:
|
22
|
-
|
71
|
+
|
72
|
+
- Properly generate Open Graph meta tags for object types that fail to provide a proper scope (e.g. `restaurant:contact_info` metadata for `restaurant:restaurant` object type).
|
23
73
|
|
24
74
|
Bugfixes:
|
25
|
-
|
75
|
+
|
76
|
+
- Description truncated to empty string and removed from meta tags when limit is set to `0` (while documentation suggests we should remove limits in this case).
|
26
77
|
|
27
78
|
## 2.7.0 (November 22, 2017) [☰](https://github.com/kpumuk/meta-tags/compare/v2.6.0...v2.7.0)
|
28
79
|
|
29
80
|
Changes:
|
30
|
-
|
81
|
+
|
82
|
+
- Generate open meta tags (`<meta ... >`) instead of closed meta tags (`<meta ... />`) by default, which is . Added a new option to switch back to self-closing meta tags, which are valid in HTML5, but unnecessary.
|
31
83
|
|
32
84
|
## 2.6.0 (August 24, 2017) [☰](https://github.com/kpumuk/meta-tags/compare/v2.5.0...v2.6.0)
|
33
85
|
|
34
86
|
Features:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
87
|
+
|
88
|
+
- Optionally avoid downcasing keywords
|
89
|
+
- Added Rails generator to create an initializer with the default settings.
|
90
|
+
- Added a configuration option `truncate_site_title_first` which enables site title truncation when title limit is reached.
|
91
|
+
- When `Time`, `Date`, or `DateTime` passed as a meta tag value, it will be formatted according to ISO 8601.
|
39
92
|
|
40
93
|
Bugfixes:
|
41
|
-
|
42
|
-
|
94
|
+
|
95
|
+
- When title limit reached with `reverse` set to `true`, properly truncate the last item of the title array instead of the first one.
|
96
|
+
- Do not merge title and site title for OpenGraph, site title is available for reference as `:site`, and full title as `:full_title`.
|
43
97
|
|
44
98
|
Changes:
|
45
|
-
|
99
|
+
|
100
|
+
- Removed Google "author" and "publisher" links, as Google deprecated these options (https://support.google.com/webmasters/answer/6083347?hl=en)
|
46
101
|
|
47
102
|
## 2.5.0 (August 23, 2017) [☰](https://github.com/kpumuk/meta-tags/compare/v2.4.1...v2.5.0)
|
48
103
|
|
49
104
|
Features:
|
50
|
-
|
105
|
+
|
106
|
+
- Fully support [Open Graph objects](https://developers.facebook.com/docs/reference/opengraph) meta tags.
|
51
107
|
|
52
108
|
Changes:
|
53
|
-
|
109
|
+
|
110
|
+
- Dropped official support for Rails older than 4.2 and Ruby older than 2.2 (both reached their End of Life)
|
54
111
|
|
55
112
|
## 2.4.1 (May 15, 2017) [☰](https://github.com/kpumuk/meta-tags/compare/v2.4.0...v2.4.1)
|
56
113
|
|
57
114
|
Features:
|
58
|
-
|
115
|
+
|
116
|
+
- Rails 5.1 support added
|
59
117
|
|
60
118
|
## 2.4.0 (December 8, 2016) [☰](https://github.com/kpumuk/meta-tags/compare/v2.3.1...v2.4.0)
|
61
119
|
|
62
120
|
Features:
|
63
|
-
|
121
|
+
|
122
|
+
- Added amphtml links support
|
64
123
|
|
65
124
|
Bugfixes:
|
66
|
-
|
125
|
+
|
126
|
+
- Fixed `place` attribute meta tag generation
|
67
127
|
|
68
128
|
## 2.3.1 (September 13, 2016) [☰](https://github.com/kpumuk/meta-tags/compare/v2.2.0...v2.3.1)
|
69
129
|
|
70
130
|
Changes:
|
71
|
-
|
131
|
+
|
132
|
+
- Added follow meta tag support
|
72
133
|
|
73
134
|
Features:
|
74
|
-
|
135
|
+
|
136
|
+
- Added support for article meta tags
|
75
137
|
|
76
138
|
## 2.2.0 (August 24, 2016) [☰](https://github.com/kpumuk/meta-tags/compare/v2.1.0...v2.2.0)
|
77
139
|
|
78
140
|
Changes:
|
79
141
|
|
80
|
-
|
142
|
+
- Rails < 3.2 is not longer supported
|
81
143
|
|
82
144
|
Features:
|
83
145
|
|
84
|
-
|
85
|
-
|
86
|
-
|
146
|
+
- Added support for `<link rel="image_src" href="...">` tag
|
147
|
+
- Added support for App Links
|
148
|
+
- Added support for `follow` meta tag
|
87
149
|
|
88
150
|
Bugfixes:
|
89
151
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
152
|
+
- Fixed double escaping for ampersands (thanks to @srecnig)
|
153
|
+
- Removed usage of `alias_method_chain` to fix deprecation warnings with Rails 5
|
154
|
+
- Fixed the issue when title was truncated in some cases, when site_title was blank
|
155
|
+
- Fixed meta tag attributes for `fb:` meta tags
|
94
156
|
|
95
157
|
## 2.1.0 (October 6, 2015) [☰](https://github.com/kpumuk/meta-tags/compare/v2.0.0...v2.1.0)
|
96
158
|
|
97
159
|
Changes:
|
98
160
|
|
99
|
-
|
161
|
+
- Ruby < 2.0 is not longer supported
|
100
162
|
|
101
163
|
Features:
|
102
164
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
165
|
+
- Added charset meta tag
|
166
|
+
- Added ability to configure limits for title, description, keywords
|
167
|
+
- Added OpenSearch links support
|
168
|
+
- Added icon links support
|
169
|
+
- Alternate links can now be generated for RSS or mobile versions
|
108
170
|
|
109
171
|
Bugfixes
|
110
|
-
|
111
|
-
|
172
|
+
|
173
|
+
- Generate `<meta name=""/>` instead of `<meta property=""/>` for custom meta tags
|
174
|
+
- Double HTML escaping in meta tags
|
112
175
|
|
113
176
|
## 2.0.0 (April 15, 2014) [☰](https://github.com/kpumuk/meta-tags/compare/v1.6.0...v2.0.0)
|
114
177
|
|
115
178
|
Features:
|
116
179
|
|
117
|
-
|
180
|
+
- Fully refactored code base.
|
118
181
|
|
119
182
|
Bugfixes:
|
120
183
|
|
121
|
-
|
184
|
+
- Symlink references in nested hashes include use normalized meta tag values.
|
122
185
|
|
123
186
|
## 1.6.0 (April 14, 2014) [☰](https://github.com/kpumuk/meta-tags/compare/v1.5.0...v1.6.0)
|
124
187
|
|
125
188
|
Features:
|
126
189
|
|
127
|
-
|
128
|
-
|
129
|
-
|
190
|
+
- Added "alternate" links support
|
191
|
+
- Added Google "author" and "publisher" links
|
192
|
+
- Implemented mirrored values inside namespaces declared as hashes
|
130
193
|
|
131
194
|
Breaking changes:
|
132
195
|
|
133
|
-
|
196
|
+
- Removed support of Rails older than 3.0.0 due to the bug in `Hash#deep_merge` (does not support `HashWithIndifferentAccess`)
|
134
197
|
|
135
198
|
## 1.5.0 (May 7, 2013) [☰](https://github.com/kpumuk/meta-tags/compare/v1.4.1...v1.5.0)
|
136
199
|
|
137
200
|
Features:
|
138
201
|
|
139
|
-
|
140
|
-
|
202
|
+
- Added "prev" and "next" links support
|
203
|
+
- Added refresh meta tag support
|
141
204
|
|
142
205
|
## 1.4.1 (March 14, 2013) [☰](https://github.com/kpumuk/meta-tags/compare/v1.4.0...v1.4.1)
|
143
206
|
|
144
207
|
Bugfixes:
|
145
208
|
|
146
|
-
|
209
|
+
- Added support for Hash inside of an Array
|
147
210
|
|
148
211
|
## 1.4.0 (March 14, 2013) [☰](https://github.com/kpumuk/meta-tags/compare/v1.3.0...v1.4.0)
|
149
212
|
|
150
213
|
Features:
|
151
214
|
|
152
|
-
|
215
|
+
- Added support of custom meta tags
|
153
216
|
|
154
217
|
## 1.3.0 (February 13, 2013) [☰](https://github.com/kpumuk/meta-tags/compare/v1.2.6...v1.3.0)
|
155
218
|
|
156
219
|
Features:
|
157
220
|
|
158
|
-
|
159
|
-
|
160
|
-
|
221
|
+
- Added Hash and Array as possible contents for the meta tags. Check README for details
|
222
|
+
- Added support of string meta tag names
|
223
|
+
- Allow to disable noindex and nofollow using `false` as a value
|
161
224
|
|
162
225
|
Bugfixes:
|
163
226
|
|
164
|
-
|
165
|
-
|
227
|
+
- Do not display title HTML tag when title is blank
|
228
|
+
- Do not display OpenGraph tags when content is empty
|
166
229
|
|
167
230
|
## 1.2.6 (March 4, 2012) [☰](https://github.com/kpumuk/meta-tags/compare/v1.2.5...v1.2.6)
|
168
231
|
|
169
232
|
Features:
|
170
233
|
|
171
|
-
|
234
|
+
- jQuery.pjax support via `display_title` method. Check README for details
|
172
235
|
|
173
236
|
## 1.2.5 (March 3, 2012) [☰](https://github.com/kpumuk/meta-tags/compare/v1.2.4...v1.2.5)
|
174
237
|
|
175
238
|
Bugfixes:
|
176
239
|
|
177
|
-
|
178
|
-
|
179
|
-
|
240
|
+
- Fixed bug with overriding open graph attributes
|
241
|
+
- Fixed incorrect page title when `:site` is is blank
|
242
|
+
- Normalize `:og` attribute to `:open_graph`
|
180
243
|
|
181
244
|
## 1.2.4 (April 26, 2011) [☰](https://github.com/kpumuk/meta-tags/compare/v1.2.3...v1.2.4)
|
182
245
|
|
183
246
|
Features:
|
184
247
|
|
185
|
-
|
248
|
+
- Added support for Open Graph meta tags
|
186
249
|
|
187
250
|
Bugfixes:
|
188
251
|
|
189
|
-
|
190
|
-
|
252
|
+
- Fixed bug with double HTML escaping in title separator
|
253
|
+
- Allow to set meta title without a separator
|
191
254
|
|
192
255
|
## 1.2.2, 1.2.3 (June 10, 2010) [☰](https://github.com/kpumuk/meta-tags/compare/v1.2.1...v1.2.3)
|
193
256
|
|
194
257
|
Bugfixes:
|
195
258
|
|
196
|
-
|
197
|
-
|
259
|
+
- Fixed action_pack integration (welcome back `alias_method_chain`)
|
260
|
+
- Fixed bug when `@page_*` variables did not work
|
198
261
|
|
199
262
|
## 1.2.1 (June 2, 2010) [☰](https://github.com/kpumuk/meta-tags/compare/v1.2.0...v1.2.1)
|
200
263
|
|
201
264
|
Bugfixes:
|
202
265
|
|
203
|
-
|
266
|
+
- Fixed deprecation warning about `html_safe!`
|
204
267
|
|
205
268
|
## 1.2.0 (May 31, 2010) [☰](https://github.com/kpumuk/meta-tags/compare/v1.1.1...v1.2.0)
|
206
269
|
|
207
270
|
Bugfixes:
|
208
271
|
|
209
|
-
|
210
|
-
|
272
|
+
- Fixed bug when title is set through Array, and `:lowercase` is true
|
273
|
+
- Updated `display_meta_tags` to be compatible with rails_xss
|
211
274
|
|
212
275
|
## 1.1.1 (November 21, 2009) [☰](https://github.com/kpumuk/meta-tags/compare/v1.1.0...v1.1.1)
|
213
276
|
|
214
277
|
Features:
|
215
278
|
|
216
|
-
|
217
|
-
|
279
|
+
- Added support for canonical link element
|
280
|
+
- Added YARD documentation
|
218
281
|
|
219
282
|
## 1.1.0 (November 5, 2009) [☰](https://github.com/kpumuk/meta-tags/commits/v1.1.0)
|
220
283
|
|
221
284
|
Features:
|
222
285
|
|
223
|
-
|
224
|
-
|
225
|
-
|
286
|
+
- Added ability to specify title as an Array of parts
|
287
|
+
- Added helper for `noindex`
|
288
|
+
- Added `nofollow` meta tag support
|
226
289
|
|
227
290
|
Bugfixes:
|
228
291
|
|
229
|
-
|
292
|
+
- Fixed Rails 2.3 deprecation warnings
|
data/Gemfile
CHANGED
@@ -1,11 +1,25 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
2
4
|
|
3
5
|
# Specify your gem's dependencies in meta-tags.gemspec
|
4
6
|
gemspec
|
5
7
|
|
6
|
-
|
8
|
+
if ENV['RAILS_VERSION']
|
9
|
+
# Install specified version of actionpack if requested
|
10
|
+
gem 'railties', "~> #{ENV['RAILS_VERSION']}"
|
11
|
+
end
|
7
12
|
|
8
13
|
group :test do
|
9
|
-
|
14
|
+
# Lock rubocop to a specific version we use on CI. If you update this,
|
15
|
+
# don't forget to switch rubocop channel in the .codeclimate.yml
|
16
|
+
gem 'rubocop', '~> 0.75.0'
|
17
|
+
# Cops for rails apps
|
18
|
+
gem 'rubocop-rails'
|
19
|
+
# Apply RSpec rubocop cops
|
20
|
+
gem 'rubocop-rspec', require: false
|
21
|
+
# We use this gem on CI to calculate code coverage.
|
22
|
+
gem 'simplecov', '>= 0.17.0', '< 0.18'
|
23
|
+
# Format RSpec output for CircleCI
|
10
24
|
gem 'rspec_junit_formatter'
|
11
25
|
end
|
data/README.md
CHANGED
@@ -11,13 +11,13 @@ Search Engine Optimization (SEO) plugin for Ruby on Rails applications.
|
|
11
11
|
|
12
12
|
## Ruby on Rails
|
13
13
|
|
14
|
-
MetaTags master branch fully supports Ruby on Rails
|
15
|
-
major Rails releases up to
|
14
|
+
MetaTags master branch fully supports Ruby on Rails 5.1+, and is tested against all
|
15
|
+
major Rails releases up to 6.1.
|
16
16
|
|
17
|
-
Ruby versions older than 2.
|
17
|
+
Ruby versions older than 2.5 are no longer officially supported.
|
18
18
|
|
19
|
-
_Please note_ that we are no longer support Ruby versions older than 2.
|
20
|
-
Ruby on Rails older than
|
19
|
+
_Please note_ that we are no longer support Ruby versions older than 2.4.0 and
|
20
|
+
Ruby on Rails older than 5.1, because they [reached their End of Life](https://github.com/kpumuk/meta-tags/pull/143).
|
21
21
|
|
22
22
|
## Installation
|
23
23
|
|
@@ -36,7 +36,7 @@ truncation have recommended values, you can change them to reflect your own
|
|
36
36
|
preferences. Keywords are converted to lowercase by default, but this is also
|
37
37
|
configurable.
|
38
38
|
|
39
|
-
To
|
39
|
+
To override the defaults, create an initializer
|
40
40
|
`config/initializers/meta_tags.rb` using the following command:
|
41
41
|
|
42
42
|
```bash
|
@@ -152,30 +152,30 @@ If you want to set the title and display another text, use this:
|
|
152
152
|
|
153
153
|
Use these options to customize the title format:
|
154
154
|
|
155
|
-
| Option | Description
|
156
|
-
| -------------- |
|
157
|
-
| `:site` | site title
|
158
|
-
| `:title` | page title
|
159
|
-
| `:description` | page description
|
160
|
-
| `:keywords` | page keywords
|
161
|
-
| `:charset` | page character set
|
162
|
-
| `:prefix` | text between site name and separator
|
163
|
-
| `:separator` | text used to separate website name from page title
|
164
|
-
| `:suffix` | text between separator and page title
|
165
|
-
| `:lowercase` | when true, the page name will be lowercase
|
166
|
-
| `:reverse` | when true, the page and site names will be reversed
|
167
|
-
| `:noindex` | add noindex meta tag; when true, 'robots' will be used
|
168
|
-
| `:index` | add index meta tag; when true, 'robots' will be used
|
169
|
-
| `:nofollow` | add nofollow meta tag; when true, 'robots' will be used
|
170
|
-
| `:follow` | add follow meta tag; when true, 'robots' will be used
|
171
|
-
| `:noarchive` | add noarchive meta tag; when true, 'robots' will be used
|
172
|
-
| `:canonical` | add canonical link tag
|
173
|
-
| `:prev` | add prev link tag
|
174
|
-
| `:next` | add next link tag
|
175
|
-
| `:image_src` | add image_src link tag
|
176
|
-
| `:og` | add Open Graph tags (Hash)
|
177
|
-
| `:twitter` | add Twitter tags (Hash)
|
178
|
-
| `:refresh` | refresh interval and optionally url to redirect to
|
155
|
+
| Option | Description |
|
156
|
+
| -------------- | -------------------------------------------------------------------------------------------------------------------- |
|
157
|
+
| `:site` | site title |
|
158
|
+
| `:title` | page title |
|
159
|
+
| `:description` | page description |
|
160
|
+
| `:keywords` | page keywords |
|
161
|
+
| `:charset` | page character set |
|
162
|
+
| `:prefix` | text between site name and separator |
|
163
|
+
| `:separator` | text used to separate website name from page title |
|
164
|
+
| `:suffix` | text between separator and page title |
|
165
|
+
| `:lowercase` | when true, the page name will be lowercase |
|
166
|
+
| `:reverse` | when true, the page and site names will be reversed |
|
167
|
+
| `:noindex` | add noindex meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
|
168
|
+
| `:index` | add index meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
|
169
|
+
| `:nofollow` | add nofollow meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
|
170
|
+
| `:follow` | add follow meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
|
171
|
+
| `:noarchive` | add noarchive meta tag; when true, 'robots' will be used; accepts a string with a robot name, or an array of strings |
|
172
|
+
| `:canonical` | add canonical link tag |
|
173
|
+
| `:prev` | add prev link tag |
|
174
|
+
| `:next` | add next link tag |
|
175
|
+
| `:image_src` | add image_src link tag |
|
176
|
+
| `:og` | add Open Graph tags (Hash) |
|
177
|
+
| `:twitter` | add Twitter tags (Hash) |
|
178
|
+
| `:refresh` | refresh interval and optionally url to redirect to |
|
179
179
|
|
180
180
|
And here are a few examples to give you ideas.
|
181
181
|
|
@@ -307,7 +307,7 @@ Recommended title tag length: up to <b>70 characters</b>, <b>10 words</b>.
|
|
307
307
|
|
308
308
|
Further reading:
|
309
309
|
|
310
|
-
|
310
|
+
- [Title Tag](https://moz.com/learn/seo/title-tag)
|
311
311
|
|
312
312
|
### Description
|
313
313
|
|
@@ -325,8 +325,8 @@ Recommended description tag length: up to <b>300 characters</b>.
|
|
325
325
|
|
326
326
|
Further reading:
|
327
327
|
|
328
|
-
|
329
|
-
|
328
|
+
- [Meta Description](https://moz.com/learn/seo/meta-description)
|
329
|
+
- [How Long Should Your Meta Description Be? (2018 Edition)](https://moz.com/blog/how-long-should-your-meta-description-be-2018)
|
330
330
|
|
331
331
|
### Keywords
|
332
332
|
|
@@ -360,8 +360,8 @@ This is useful for pages like login, password reset, privacy policy, etc.
|
|
360
360
|
|
361
361
|
Further reading:
|
362
362
|
|
363
|
-
|
364
|
-
|
363
|
+
- [Blocking Google](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93708)
|
364
|
+
- [Using meta tags to block access to your site](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=93710)
|
365
365
|
|
366
366
|
### Index
|
367
367
|
|
@@ -388,12 +388,12 @@ set_meta_tags nofollow: 'googlebot'
|
|
388
388
|
|
389
389
|
Further reading:
|
390
390
|
|
391
|
-
|
392
|
-
|
391
|
+
- [About rel="nofollow"](http://www.google.com/support/webmasters/bin/answer.py?answer=96569)
|
392
|
+
- [Meta tags](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=79812)
|
393
393
|
|
394
394
|
### Follow
|
395
395
|
|
396
|
-
Follow will work with Noindex
|
396
|
+
Follow will work with Noindex meta tag
|
397
397
|
|
398
398
|
```ruby
|
399
399
|
set_meta_tags noindex: true, follow: true
|
@@ -416,8 +416,8 @@ set_meta_tags canonical: "http://yoursite.com/canonical/url"
|
|
416
416
|
|
417
417
|
Further reading:
|
418
418
|
|
419
|
-
|
420
|
-
|
419
|
+
- [About rel="canonical"](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139394)
|
420
|
+
- [Canonicalization](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=139066)
|
421
421
|
|
422
422
|
### Icon
|
423
423
|
|
@@ -440,9 +440,8 @@ set_meta_tags icon: [
|
|
440
440
|
|
441
441
|
Further reading:
|
442
442
|
|
443
|
-
|
444
|
-
|
445
|
-
|
443
|
+
- [Favicon](https://www.wikiwand.com/en/Favicon)
|
444
|
+
- [Touch Icons](https://mathiasbynens.be/notes/touch-icons)
|
446
445
|
|
447
446
|
### Multi-regional and multilingual URLs, RSS and mobile links
|
448
447
|
|
@@ -471,9 +470,9 @@ set_meta_tags alternate: [
|
|
471
470
|
|
472
471
|
Further reading:
|
473
472
|
|
474
|
-
|
475
|
-
|
476
|
-
|
473
|
+
- [Multi-regional and multilingual sites](https://support.google.com/webmasters/answer/182192)
|
474
|
+
- [About rel="alternate" hreflang="x"](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=189077)
|
475
|
+
- [Separate URLs](https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls#annotation-in-the-html)
|
477
476
|
|
478
477
|
### Pagination links
|
479
478
|
|
@@ -490,8 +489,8 @@ set_meta_tags next: "http://yoursite.com/url?page=3"
|
|
490
489
|
|
491
490
|
Further reading:
|
492
491
|
|
493
|
-
|
494
|
-
|
492
|
+
- [Pagination](http://support.google.com/webmasters/bin/answer.py?hl=en&answer=1663744)
|
493
|
+
- [Pagination with rel="next" and rel="prev"](http://googlewebmastercentral.blogspot.ca/2011/09/pagination-with-relnext-and-relprev.html)
|
495
494
|
|
496
495
|
### image_src links
|
497
496
|
|
@@ -518,8 +517,8 @@ set_meta_tags amphtml: url_for(format: :amp, only_path: false)
|
|
518
517
|
|
519
518
|
To link back to normal version, use `canonical`.
|
520
519
|
|
521
|
-
|
522
|
-
|
520
|
+
- [What Is AMP?](https://www.ampproject.org/learn/about-amp/)
|
521
|
+
- [Make Your Page Discoverable](https://www.ampproject.org/docs/guides/discovery)
|
523
522
|
|
524
523
|
### Refresh interval and redirect URL
|
525
524
|
|
@@ -539,9 +538,8 @@ set_meta_tags refresh: '5;url=http://example.com'
|
|
539
538
|
|
540
539
|
Further reading:
|
541
540
|
|
542
|
-
|
543
|
-
|
544
|
-
|
541
|
+
- [Meta refresh](http://en.wikipedia.org/wiki/Meta_refresh)
|
542
|
+
- [What is the Meta Refresh Tag](http://webdesign.about.com/od/metataglibraries/a/aa080300a.htm)
|
545
543
|
|
546
544
|
### Open Search
|
547
545
|
|
@@ -557,8 +555,8 @@ set_meta_tags open_search: {
|
|
557
555
|
|
558
556
|
Further reading:
|
559
557
|
|
560
|
-
|
561
|
-
|
558
|
+
- [OpenSearch specs](http://www.opensearch.org/Specifications/OpenSearch/1.1)
|
559
|
+
- [OpenSearch wiki](http://en.wikipedia.org/wiki/OpenSearch)
|
562
560
|
|
563
561
|
### Hashes
|
564
562
|
|
@@ -660,8 +658,8 @@ set_meta_tags article: {
|
|
660
658
|
|
661
659
|
Further reading:
|
662
660
|
|
663
|
-
|
664
|
-
|
661
|
+
- [Open Graph protocol](http://developers.facebook.com/docs/opengraph/)
|
662
|
+
- [Must-Have Social Meta Tags for Twitter, Google+, Facebook and More](https://moz.com/blog/meta-data-templates-123)
|
665
663
|
|
666
664
|
### Twitter Cards
|
667
665
|
|
@@ -698,7 +696,7 @@ set_meta_tags twitter: {
|
|
698
696
|
|
699
697
|
Further reading:
|
700
698
|
|
701
|
-
|
699
|
+
- [Twitter Cards Documentation](https://dev.twitter.com/cards/)
|
702
700
|
|
703
701
|
### App Links
|
704
702
|
|
@@ -719,7 +717,7 @@ set_meta_tags al: {
|
|
719
717
|
|
720
718
|
Further reading:
|
721
719
|
|
722
|
-
|
720
|
+
- [App Links Documentation](https://developers.facebook.com/docs/applinks)
|
723
721
|
|
724
722
|
### Custom meta tags
|
725
723
|
|