sutty-archives 2.5.2 → 2.5.5

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
  SHA256:
3
- metadata.gz: b8a095196aeb5056b025411ea4903f3f216c17ee98156f6510505b7b13c99d76
4
- data.tar.gz: f0de3000044bece4ddc3304a340c4118dfdb72b049ee73fce0903167632e3eb8
3
+ metadata.gz: 7a7b625f7e0e1136e25917a6344f4bd17cb3586d3b3a694319e9df032f70623b
4
+ data.tar.gz: 17b9d72719176cd4644da8f202a35085bfd7a2826f0bed22a216f77008e3d3a1
5
5
  SHA512:
6
- metadata.gz: 64d92442969a17a69f35af7c89e7496eeb8ff57ea7bf89cd8c8f8225eaeaa62157cbbd78e339cbfa4d87c01dcdf933b2c29ae1bde1b22352891a4d1ff322767d
7
- data.tar.gz: 0ca2b534faeb9e035fd7fe95d488e4532732a9c83d4cc5f98ad8b1902ee6f0e2655275dc409e3deff3aea7823f0eede938f24e432a00e57d36b2381cb9b08eca
6
+ metadata.gz: e083687e93b7e0f8695b11828afded3f00044008d811ab2f6d46947dec8e1ece868d94fb1569f7b7851a5c3b94dc35709743419554e3fb2d5332cf23f9727615
7
+ data.tar.gz: 2d5754d60a815151a96243b838fcf8ffb898ec276ebb65321389473196e821eef8300e7af28458c56f1aa4f0bf2d1c843be3c7a5498668615b27f7c75f20dff8
@@ -40,9 +40,10 @@ module Jekyll
40
40
  @path = relative_path
41
41
  @name = File.basename(relative_path, @ext)
42
42
 
43
- @data = { "layout" => layout }
43
+ @data = { "layout" => layout, "title" => title }
44
44
 
45
45
  if title.is_a?(Hash) && !date?
46
+ title['_layout'] = title.delete 'layout'
46
47
  @data.merge! title
47
48
  end
48
49
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Archives
5
- VERSION = "2.5.2"
5
+ VERSION = "2.5.5"
6
6
  end
7
7
  end
@@ -171,14 +171,21 @@ module Jekyll
171
171
  def read_types
172
172
  @config['enabled'].each do |type|
173
173
  type = LEGACY_ATTRS[type] if LEGACY_ATTRS[type]
174
+ posts = @site.config['archives'][type]&.map(&:posts)&.flatten&.uniq
174
175
 
175
- @archives << Archive.new(@site, type, 'group', @site.config['archives'][type].map(&:posts).flatten.uniq)
176
+ next unless posts
177
+
178
+ @archives << Archive.new(@site, type, 'group', posts)
176
179
  end
177
180
 
178
181
  return unless combined?
179
182
 
180
183
  @config['combined'].each do |type, _|
181
- @archives << Archive.new(@site, type, 'group', @site.config['archives'][type].map(&:posts).flatten.uniq)
184
+ posts = @site.config['archives'][type]&.map(&:posts)&.flatten&.uniq
185
+
186
+ next unless posts
187
+
188
+ @archives << Archive.new(@site, type, 'group', posts)
182
189
  end
183
190
  end
184
191
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sutty-archives
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alfred Xing
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-03 00:00:00.000000000 Z
12
+ date: 2022-03-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  - !ruby/object:Gem::Version
145
145
  version: '0'
146
146
  requirements: []
147
- rubygems_version: 3.1.2
147
+ rubygems_version: 3.3.5
148
148
  signing_key:
149
149
  specification_version: 4
150
150
  summary: Post archives for Jekyll. Fork of jekyll-archives.