meta-tags-helpers 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +8 -6
- data/VERSION +1 -1
- data/lib/meta_tags_helpers.rb +1 -1
- data/meta-tags-helpers.gemspec +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -39,17 +39,19 @@ The first example above will produce the following html:
|
|
39
39
|
<meta name="X-UA-Compatible" content="IE=edge,chrome=1" />
|
40
40
|
<meta name="viewport" content="width=device-width" />
|
41
41
|
<title>MyBlog - This is a Blog</title>
|
42
|
-
<meta
|
43
|
-
<meta
|
44
|
-
<meta
|
45
|
-
<meta
|
46
|
-
<meta
|
47
|
-
<meta
|
42
|
+
<meta property="description" content="The blog of mine & a reserved character" />
|
43
|
+
<meta property="og:url" content="(THE CURRENT REQUESTED URL)" />
|
44
|
+
<meta property="og:type" content="website" />
|
45
|
+
<meta property="og:title" content="MyBlog - This is a Blog" />
|
46
|
+
<meta property="og:description" content="The blog of mine & a reserved character" />
|
47
|
+
<meta property="ns:my_custom_meta" content="a value" />
|
48
48
|
<meta name="csrf-param" content="..." />
|
49
49
|
<meta name="csrf-token" content="..." />
|
50
50
|
|
51
51
|
```
|
52
52
|
|
53
|
+
**NOTE:** namespaced meta (eg. `og:title`) are supposed to be RDF properties and so they are marked using a `property` attribute.
|
54
|
+
|
53
55
|
### Setting meta tags from controller/partials/other views
|
54
56
|
|
55
57
|
You can customize some of defautls (see below) through handy helpers within controllers or views:
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/meta_tags_helpers.rb
CHANGED
@@ -64,7 +64,7 @@ module MetaTagsHelpers
|
|
64
64
|
html = ""
|
65
65
|
html << "<title>#{h(meta_hash.delete(:title)) }</title>\n"
|
66
66
|
meta_hash.each {|k,v|
|
67
|
-
if k.to_s.
|
67
|
+
if k.to_s =~ /[a-zA-Z_][-a-zA-Z0-9_.]\:/
|
68
68
|
html << "<meta property=\"#{h(k)}\" content=\"#{h(v)}\" />\n"
|
69
69
|
else
|
70
70
|
html << "<meta name=\"#{h(k)}\" content=\"#{h(v)}\" />\n"
|
data/meta-tags-helpers.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: meta-tags-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
segments:
|
91
91
|
- 0
|
92
|
-
hash:
|
92
|
+
hash: -3024929928964013503
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|