middleman-meta-tags 0.1.3 → 0.2.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 +4 -0
- data/lib/middleman-meta-tags/extension.rb +2 -6
- data/lib/middleman-meta-tags/helpers.rb +5 -1
- data/lib/middleman-meta-tags/version.rb +1 -1
- data/lib/middleman-meta-tags.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6b5508919401357afff08347fbb15c8492c6f8f
|
4
|
+
data.tar.gz: e7208180d65aa063c36a3acaffda2e0660756ad2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0f24f7206d6de484d69b514eb099f1c6bfd2ae029bf8c9bb3a27b952753d50e1e84eb02927cce76cc7d99f3a8c304074b6255c729d5fc08e766c65e54a978f7
|
7
|
+
data.tar.gz: 9c1003785ae089d120d1ee111086d75ad116ff992f324b3689c6bc94e596f0c4d1256c2e817b61153a4683f7eb33adf84b18fe60f9fce2c35c515479a6862938
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -87,6 +87,10 @@ Then it looks the page meta data to attempt to display the following keys:
|
|
87
87
|
- MM `site` => META `og:site_name`
|
88
88
|
- MM `title` => META `og:title`
|
89
89
|
|
90
|
+
In addition, if you want to customize meta tags by each page's frontmatter, you
|
91
|
+
can add `customize_by_frontmatter: true` in `data/site.yml`. The priority would
|
92
|
+
be set_meta_tags > frontmatter > site wide defaults.
|
93
|
+
|
90
94
|
### Manually adding addition tags
|
91
95
|
|
92
96
|
Create a helper method inside of your config.rb, like so
|
@@ -1,11 +1,7 @@
|
|
1
1
|
require 'middleman-meta-tags/helpers'
|
2
2
|
|
3
3
|
module Middleman
|
4
|
-
|
5
|
-
|
6
|
-
def registered(app, options_hash = {}, &block)
|
7
|
-
app.helpers Middleman::MetaTags::Helpers
|
8
|
-
end
|
9
|
-
end
|
4
|
+
class MetaTagsExtension < Extension
|
5
|
+
self.defined_helpers = [Middleman::MetaTags::Helpers]
|
10
6
|
end
|
11
7
|
end
|
@@ -81,7 +81,11 @@ module Middleman
|
|
81
81
|
private
|
82
82
|
|
83
83
|
def fall_through(site_data, name, key, default = nil)
|
84
|
-
|
84
|
+
need_customized = site_data[:customize_by_frontmatter]
|
85
|
+
value = self.meta_tags[key] ||
|
86
|
+
(need_customized && current_page.data[key]) ||
|
87
|
+
site_data[key] ||
|
88
|
+
default
|
85
89
|
set_meta_tags name => value unless value.blank?
|
86
90
|
value
|
87
91
|
end
|
data/lib/middleman-meta-tags.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-meta-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Baptiste Lecocq
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
91
|
version: '0'
|
92
92
|
requirements: []
|
93
93
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.4.
|
94
|
+
rubygems_version: 2.4.6
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
97
|
summary: Meta tags for Middleman
|