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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ddf0e0c1f4317fa4d60586927f7eced68ba6bcb
4
- data.tar.gz: 686df01d46673b0e61baad90a72f00b84d8df3a5
3
+ metadata.gz: 801de5d874ba5a66f88d7e30853b45902f52851c
4
+ data.tar.gz: ee8dc6fc764058218f5f17651db9bcf9e4896958
5
5
  SHA512:
6
- metadata.gz: 5359bfbd736f754ae457a8eb30f2733ca7fe654a4c0ff346287f968e1f262a8e8c7da941ff412a704583752392a504511ee99b9cd58a760cd5e1f29f2c936bd8
7
- data.tar.gz: 25db415a050e8d045abcf5c16bc2a2d4ddf10e2be7cdee8e52475bc6818f2d4d91584cf4ab271dac689b210f20acc4b6d2c56450194ccaafdb4af00e407a8e1a
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-categorize-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PGA of America