jekyll-categorize-pages 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-categorize-pages.rb +7 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 801de5d874ba5a66f88d7e30853b45902f52851c
|
4
|
+
data.tar.gz: ee8dc6fc764058218f5f17651db9bcf9e4896958
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c00275350f733eb612461f21b616df9547222ee4792cb57bb703a8d046dfa07a9cb05fa15a6716655d40857835fe3090fd7d286b72ff9e8ed7cdfcc95eaf2303
|
7
|
+
data.tar.gz: e4e069cefefd21d8e191e819fd56be7bd77f2f15d0b2c59dfe53eab36896fb2297b12a7fe3c77534febbc46166d6961071c21d9beb033a8cfcaec25ec63cd927
|
@@ -23,13 +23,6 @@ module Jekyll
|
|
23
23
|
all_categories = @site.data["all_categories"] || [] # sub folders inside collection
|
24
24
|
path = item.relative_path.split('/')
|
25
25
|
|
26
|
-
# if category folder has no sub categories
|
27
|
-
if path.length == 3
|
28
|
-
header_values = { "category" => path[1] }
|
29
|
-
add_to_frontmatter(item, header_values)
|
30
|
-
return false
|
31
|
-
end
|
32
|
-
|
33
26
|
if path[1] != "index.html" and path[1] != "index.md"
|
34
27
|
category = path[1]
|
35
28
|
end
|
@@ -37,6 +30,13 @@ module Jekyll
|
|
37
30
|
sub_category = path[2]
|
38
31
|
end
|
39
32
|
|
33
|
+
# if category folder has no sub categories
|
34
|
+
if path.length == 3
|
35
|
+
header_values = { "category" => path[1] }
|
36
|
+
add_to_frontmatter(item, header_values)
|
37
|
+
return false
|
38
|
+
end
|
39
|
+
|
40
40
|
return all_categories.include?(category)
|
41
41
|
end
|
42
42
|
|