jekyll-archives-v2 0.0.2 → 0.0.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
  SHA256:
3
- metadata.gz: 28ab7010d977499dd06d3711f2a3d952be8c4db2d6a10a674ab46ad0e2faf6c1
4
- data.tar.gz: 845c8346693b1e1214890909eac88b311e2fd80c72c7745a28a974099c50ce43
3
+ metadata.gz: a627d116dccfd0c16c031b21c4e61817912e414a300f586e103dc9fb84499412
4
+ data.tar.gz: b73d608cc75bc0b00e7af2cb525575f7a400d6514c2dc9d9c9ee7dec29e0da31
5
5
  SHA512:
6
- metadata.gz: 7bf8375d96489119203ef2a16b0072a3044521ea9595a15de554fd2e8d48e7030e7e2b569cf302b16926dfb7626df655c22001651520b8d250dfc074fce8ab2f
7
- data.tar.gz: 0ede50f993dd786b6eca1f55439bc3cf0938d3dc3d6e7e2c41de8519879c54982d1ac4784dc60d67dfd7784fb7b6afb81fae9ecefacb049a77d187064117ad5e
6
+ metadata.gz: 706f4b9f3e3bfaf8d381535020b702d044ec34fd449b4b5710cfb2c7f18524ad8c810bcbb1abcfc2f8aa1c75cc49620b09416a31b0b0a64658984cab8f57bad6
7
+ data.tar.gz: 33536cb6a931eacbac78123a4d905ec05a8171d884703cf59692fc7cd5196d66f60948fb10f97acc7ec218add4f4918d1f158289e47aacc6d2978e1191e4aaa3
@@ -7,7 +7,7 @@ module Jekyll
7
7
 
8
8
  mutable false
9
9
 
10
- def_delegators :@obj, :posts, :type, :title, :date, :name, :path, :url, :permalink
10
+ def_delegators :@obj, :collection_name, :documents, :type, :title, :date, :name, :path, :url, :permalink
11
11
  private def_delegator :@obj, :data, :fallback_data
12
12
  end
13
13
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module ArchivesV2
5
- VERSION = "0.0.2"
5
+ VERSION = "0.0.4"
6
6
  end
7
7
  end
@@ -85,11 +85,11 @@ module Jekyll
85
85
 
86
86
  def read_dates(collection_name)
87
87
  years(@collections[collection_name]).each do |year, y_documents|
88
- append_enabled_date_type({ :year => year }, "year", collection_name, y_posts)
88
+ append_enabled_date_type({ :year => year }, "year", collection_name, y_documents)
89
89
  months(y_documents).each do |month, m_documents|
90
- append_enabled_date_type({ :year => year, :month => month }, "month", collection_name, m_posts)
90
+ append_enabled_date_type({ :year => year, :month => month }, "month", collection_name, m_documents)
91
91
  days(m_documents).each do |day, d_documents|
92
- append_enabled_date_type({ :year => year, :month => month, :day => day }, "day", collection_name, d_posts)
92
+ append_enabled_date_type({ :year => year, :month => month, :day => day }, "day", collection_name, d_documents)
93
93
  end
94
94
  end
95
95
  end
@@ -97,7 +97,7 @@ module Jekyll
97
97
 
98
98
  # Checks if archive type is enabled in config
99
99
  def enabled?(collection_name, archive)
100
- @enabled == true || @enabled == "all" || (@enabled.is_a?(Array) && @enabled.include?(archive))
100
+ @config[collection_name]["enabled"] == true || @config[collection_name]["enabled"] == "all" || (@config[collection_name]["enabled"].is_a?(Array) && @config[collection_name]["enabled"].include?(archive))
101
101
  end
102
102
 
103
103
  def tags(documents)
@@ -110,7 +110,7 @@ module Jekyll
110
110
 
111
111
  # Custom `post_attr_hash` method for years
112
112
  def years(documents)
113
- date_attr_hash(documents, "%Y")
113
+ date_attr_hash(documents.docs, "%Y")
114
114
  end
115
115
 
116
116
  # Custom `post_attr_hash` method for months
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-archives-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Corrêa de Araújo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-29 00:00:00.000000000 Z
11
+ date: 2024-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll