jekyll-categorize-pages 0.2.3 → 0.2.4

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: bad2f37efc803d9a008c197564c1336eb4cb16dd
4
- data.tar.gz: 8d25c2a70652bc7156ba6e17f1ac2a990b48db4f
3
+ metadata.gz: 3cbac3683e60538c48550eaa35506810ddadf442
4
+ data.tar.gz: dc42d336b222bda63fdcb108f861a4a05caf868f
5
5
  SHA512:
6
- metadata.gz: cb6d48fa2dee2adab864f54f1e27818a6801a968b0c43d9ab53eee51daf63802360b8368121313af973834a393d38219228755be85959eedfcffc1b5b73c6bd9
7
- data.tar.gz: be71de1ab746c6e06fff21790972b689c9ebf062fd8de42a37224111a776f1e7a5fa94b3893f22ad859883a38f4ea8d72ad023bdf23cf0f71067157e90911c77
6
+ metadata.gz: 88d32a2e66cc43a3630b00a95e11d38a1cbac27bb84f6d911b39e6aa72c8920d786d672fd1548e0a26dea6b263893341f660cc4d9546f83c0f725af7bfca36df
7
+ data.tar.gz: 6588f46513513d49359eccd242d36b7cdb13f377a31ce40904563bf7e018153329e9d4bfe9a0e4dbea23b4c71b5485b72fb5faafba4c0a196cb04f90d405b271
@@ -20,13 +20,13 @@ module Jekyll
20
20
  end
21
21
 
22
22
  def isValid?(item)
23
- all_categories = @site.data["all_categories"] || [] # sub folders inside collection
24
23
  path = item.relative_path.split('/')
24
+ # puts "item.relative_path: #{item.relative_path}"
25
25
 
26
- if path[1] != "index.html" and path[1] != "index.md"
26
+ if path[1] and path[1] != "index.html" and path[1] != "index.md"
27
27
  category = path[1]
28
28
  end
29
- if path[2] != "index.html" and path[2] != "index.md"
29
+ if path[2] and path[2] != "index.html" and path[2] != "index.md"
30
30
  sub_category = path[2]
31
31
  end
32
32
 
@@ -37,18 +37,17 @@ module Jekyll
37
37
  return false
38
38
  end
39
39
 
40
- return all_categories.include?(category)
40
+ return true
41
41
  end
42
42
 
43
43
 
44
44
  def get_header_values_to_add(item)
45
- all_categories = @site.data["all_categories"] || [] # sub folders inside collection
46
45
  path = item.relative_path.split('/')
47
46
 
48
- if path[1] != "index.html" and path[1] != "index.md"
47
+ if path[1] and path[1] != "index.html" and path[1] != "index.md"
49
48
  category = path[1]
50
49
  end
51
- if path[2] != "index.html" and path[2] != "index.md"
50
+ if path[2] and path[2] != "index.html" and path[2] != "index.md"
52
51
  sub_category = path[2]
53
52
  end
54
53
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-categorize-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PGA of America
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-18 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll