jekyll-archives-hofill 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c961fdfec875a458022427b36c647cf1933818173c04795012598ed472a035aa
4
- data.tar.gz: 9e81e79f3eaf807c1de6b740edcddb9df64d16b6c815170033447d6b320ef91a
3
+ metadata.gz: acf0eb64cc9a7d68457aacb0b9f25152d2bef05516184ed4a7d77947b1f0898c
4
+ data.tar.gz: fb5730c321921218d1b0c9fb6f58260bdca2d4e14523f33a6564935bcc368c6f
5
5
  SHA512:
6
- metadata.gz: 606e1a92b61b936036174741541ca5b030a424186193967d4cd12098d0845aeeb0560c96b25d15660d72c1f6afaa7318f43da341c9aee091626cb378e88c1532
7
- data.tar.gz: bd7c7be01954feba6acffdb0ed34e58e415a7a8665dc721288839652f943980f0700656dea44c2d4580775ca7c9745b5e84c08c661c56c88aa17268d7a1b86c6
6
+ metadata.gz: ce544a766e3d1375daa8fe55b31459de60a80ed3914744adb445f22d6a149396ec8d94a7e66b56aa5650582d1c2ab4e7157ed9a6253c1fb0472f18ff34366f93
7
+ data.tar.gz: 161efa183cb1871478ab2d4657d327e7939c5691781668f64d1ddc44b427207bfa877bb430bdc0255bfafb09a1e9404c33380166859dcc8dc2970704acda967c
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Archives
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.2"
6
6
  end
7
7
  end
@@ -12,14 +12,14 @@ module Jekyll
12
12
  safe true
13
13
 
14
14
  DEFAULTS = {
15
- "layout" => "archive",
16
- "enabled" => [],
15
+ "layout" => "archive",
16
+ "enabled" => [],
17
17
  "permalinks" => {
18
- "year" => "/:year/",
19
- "month" => "/:year/:month/",
20
- "day" => "/:year/:month/:day/",
21
- "tag" => "/tag/:name/",
22
- "category" => "/category/:name/",
18
+ "year" => "/:year/",
19
+ "month" => "/:year/:month/",
20
+ "day" => "/:year/:month/:day/",
21
+ "tag" => "/tag/:name/",
22
+ "category" => "/category/:name/",
23
23
  "writeup-category" => "/writeups/:name/",
24
24
  },
25
25
  }.freeze
@@ -56,6 +56,7 @@ module Jekyll
56
56
  read_tags
57
57
  read_categories
58
58
  read_dates
59
+ read_writeup_categories
59
60
  end
60
61
 
61
62
  def read_tags
@@ -77,7 +78,7 @@ module Jekyll
77
78
  def read_writeup_categories
78
79
  if enabled? "writeup_categories"
79
80
  writeup_categories.each do |title, posts|
80
-
81
+ @archives << Archive.new(@site, title, "writeup-category", posts)
81
82
  end
82
83
  end
83
84
  end
@@ -110,8 +111,12 @@ module Jekyll
110
111
  def writeup_categories
111
112
  final_result = {}
112
113
  @site.posts.each do |item|
114
+ next if item["writeup_categories"].nil?
115
+
113
116
  item["writeup_categories"].each do |category|
114
- final_result[category] = item
117
+ to_add = final_result.key?(category) ? final_result[category] : []
118
+ to_add.append(item)
119
+ final_result[category] = to_add
115
120
  end
116
121
  end
117
122
  final_result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-archives-hofill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alfred Xing