page_meta 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/lib/page_meta/base.rb +1 -1
- data/lib/page_meta/meta_tag/title.rb +3 -3
- data/lib/page_meta/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47b05c4d0f3a885ff8629fcd3a0c7a94e7b02ce9
|
4
|
+
data.tar.gz: 864f07a8590ad4348747251d1702259ea7ffe60f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76be3317383dc4c0c4fa0e79ae04801c39308c45483c565b85ae8aa03d91da39f8bd832e1966ac9ef8b7fa6bef592ffcbb6964cbdae74aa89559b8bd24b3f539
|
7
|
+
data.tar.gz: ce9cf345d3b877a69be7ad736139790193726f03c8376a27657720e0840bfa39cefe8e2d7bed0714b9ba9ac3208fea32736dcb87ebb7efbab8a3fc7778db4c87
|
data/README.md
CHANGED
@@ -157,7 +157,15 @@ page_meta.link :mask_icon, color: "#4078c0", href: asset_url("mask_icon.svg")
|
|
157
157
|
To render all tags, just do something like this:
|
158
158
|
|
159
159
|
```erb
|
160
|
-
|
160
|
+
<!DOCTYPE html>
|
161
|
+
<html lang="en">
|
162
|
+
<head>
|
163
|
+
<%= page_meta %>
|
164
|
+
</head>
|
165
|
+
<body>
|
166
|
+
<%= yield %>
|
167
|
+
</body>
|
168
|
+
</html>
|
161
169
|
```
|
162
170
|
|
163
171
|
## Development
|
@@ -168,7 +176,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
168
176
|
|
169
177
|
## Contributing
|
170
178
|
|
171
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
179
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/fnando/page_meta. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
172
180
|
|
173
181
|
|
174
182
|
## License
|
data/lib/page_meta/base.rb
CHANGED
@@ -64,7 +64,7 @@ module PageMeta
|
|
64
64
|
def compute_default_meta_tags
|
65
65
|
tag(:language, I18n.locale)
|
66
66
|
tag(:charset, Rails.configuration.encoding)
|
67
|
-
tag(:title, title
|
67
|
+
tag(:title, title) unless title.to_s.empty?
|
68
68
|
tag(:keywords, keywords.to_s) unless keywords.to_s.empty?
|
69
69
|
tag(:description, description.to_s) unless description.to_s.empty?
|
70
70
|
end
|
@@ -2,9 +2,9 @@ module PageMeta
|
|
2
2
|
class MetaTag
|
3
3
|
class Title < MetaTag
|
4
4
|
def render
|
5
|
-
helpers.content_tag(:title, content) +
|
6
|
-
helpers.tag(:meta, name: "DC.title", content: content) +
|
7
|
-
helpers.tag(:meta, itemprop: "name", content: content)
|
5
|
+
helpers.content_tag(:title, content.to_s) +
|
6
|
+
helpers.tag(:meta, name: "DC.title", content: content.simple) +
|
7
|
+
helpers.tag(:meta, itemprop: "name", content: content.simple)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
data/lib/page_meta/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: page_meta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|