jekyll-menus 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/menus.rb +20 -18
- data/lib/jekyll/menus/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: 9857598b8220c0edd8d1dcf67b6452480f71310f
|
4
|
+
data.tar.gz: a72b862239c693afd8b6d28d928c45ea368d0737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0337c7462c70ef80160995ff03ea2fe75c344d306eeaa313674a8f528582bee552d98f6759d3df8892a7c688f87da72926e1de6610b6ba14bac6396ed3c16bd
|
7
|
+
data.tar.gz: a964078532e50ce39446c318193f6263363e0739ebeed5f5d13c17b49a804dd9826c3be688493447394166b6e069e3eb953ea79519282422eaa5b84fcf9796aa
|
data/lib/jekyll/menus.rb
CHANGED
@@ -15,33 +15,34 @@ module Jekyll
|
|
15
15
|
|
16
16
|
def to_liquid_drop
|
17
17
|
Drops::All.new(Utils.deep_merge(
|
18
|
-
|
18
|
+
_data_menus, _page_menus
|
19
19
|
))
|
20
20
|
end
|
21
21
|
|
22
22
|
#
|
23
23
|
|
24
|
-
def
|
25
|
-
|
26
|
-
out = {}; mns.compact.each do |menus|
|
27
|
-
menus.each do |key, menu|
|
28
|
-
if menu.is_a?(Hash) || menu.is_a?(Array)
|
29
|
-
(menu = [menu].flatten).each do |item|
|
30
|
-
_validate_config_menu_item(
|
31
|
-
item
|
32
|
-
)
|
33
|
-
end
|
24
|
+
def _data_menus
|
25
|
+
out = {}
|
34
26
|
|
35
|
-
|
36
|
-
|
37
|
-
|
27
|
+
@site.data["menus"].each do |key, menu|
|
28
|
+
if menu.is_a?(Hash) || menu.is_a?(Array)
|
29
|
+
(menu = [menu].flatten).each do |item|
|
30
|
+
_validate_config_menu_item(
|
31
|
+
item
|
38
32
|
)
|
39
33
|
end
|
40
34
|
|
41
|
-
|
42
|
-
|
43
|
-
|
35
|
+
else
|
36
|
+
_throw_invalid_menu_entry(
|
37
|
+
menu
|
38
|
+
)
|
44
39
|
end
|
40
|
+
|
41
|
+
merge = { key => menu }
|
42
|
+
merge["_fronmatter"] = false
|
43
|
+
out = Utils.deep_merge(
|
44
|
+
out, merge
|
45
|
+
)
|
45
46
|
end
|
46
47
|
|
47
48
|
out
|
@@ -157,8 +158,9 @@ module Jekyll
|
|
157
158
|
val ||= {}
|
158
159
|
|
159
160
|
val["url"] ||= page.url
|
160
|
-
val["title"] ||= page.data["title"]
|
161
161
|
val["identifier"] ||= File.basename(page.name, page.ext)
|
162
|
+
val["title"] ||= page.data["title"]
|
163
|
+
val["_frontmatter"] = true
|
162
164
|
val["weight"] ||= -1
|
163
165
|
val
|
164
166
|
end
|
data/lib/jekyll/menus/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-menus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordon Bedwell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|