jekyll_all_collections 0.2.0 → 0.2.1

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: '0028eabf4e3d4acb900fb4f8896aa40511b30c455aac9f8fe8fcd8f01705b8cc'
4
- data.tar.gz: cdd9c792fb62ee38e902d211d8860a2dd97dde34ed4268011f24269d752c71dd
3
+ metadata.gz: 811fb81472784f03d1de69afa5a65af4219bd03108b64465a1b47ef133b44bf1
4
+ data.tar.gz: b164ab779c40d4341450fa30ac890d98fb122cf385fa27598b13c293b2da86b1
5
5
  SHA512:
6
- metadata.gz: 667804cdfa3f061556503396219dd6e849da04420d1b778bd47c084828e7ef491dcfcb632198131913207a3f97c39ee123933b63d5922c86866c59dd210a1713
7
- data.tar.gz: 6363d5ad42d2f3b61a548ebace5c0e54e15867c48066848d821cbf004d22ef80ec3a95ae0009d1896effed76d35ec441a64bbc6d0ca0b140833043be5e32a7d1
6
+ metadata.gz: 0d3bdc533fda83895ec8e11df167ae6fb66ffdc7e38d4e4e2a5f4499deeb4ec10f2fd601e5b7c10036e6578eab8f82f11b3ca045c369dec07254b7f53fade0b3
7
+ data.tar.gz: 2de1652307226cfb5907efbb54adf5e32987353922cce422a5e95fa49c82528babcd26b26124167822af72d41005778bb85bf77e549bdd151b82375b14372631
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.1 / 2023-02-12
2
+ * Reduced the verbosity of log output from `info` to `debug`
3
+
1
4
  ## 0.2.0 / 2023-02-04
2
5
  * Returns Array[APage] instead of a collection of different types of objects.
3
6
  * Converted the plugin to a `:site, :post_read` hook instead of a tag,
data/README.md CHANGED
@@ -189,6 +189,13 @@ Now point your web browser to http://localhost:4444
189
189
 
190
190
 
191
191
  ## Debugging
192
+ You can control the verbosity of log output by adding the following to `_config.yml` in your Jekyll project:
193
+ ```yaml
194
+ plugin_loggers:
195
+ AllCollectionsTag::AllCollectionsTag: warn
196
+ ```
197
+
198
+
192
199
  1. You have two options for initiating a debug session:
193
200
 
194
201
  1. Run `demo/_bin/debug`, without the `-r` options shown above.
@@ -34,8 +34,8 @@ module AllCollectionsTag
34
34
  sort_by = (sort_by_param&.gsub(' ', '')&.split(',') if sort_by_param != false) || ['-date']
35
35
  @heading = @helper.parameter_specified?('heading') || self.class.default_head(sort_by)
36
36
  sort_lambda_string = self.class.create_lambda_string(sort_by)
37
- @logger.info "#{@page['path']} sort_by_param=#{sort_by_param}"
38
- @logger.info " sort_lambda_string = #{sort_lambda_string}\n"
37
+ @logger.debug "#{@page['path']} sort_by_param=#{sort_by_param}"
38
+ @logger.debug " sort_lambda_string = #{sort_lambda_string}\n"
39
39
  sort_lambda = self.class.evaluate(sort_lambda_string)
40
40
  generate_output(sort_lambda)
41
41
  end
@@ -94,19 +94,19 @@ module AllCollectionsTag
94
94
  id = @id.to_s.empty? ? '' : " id='#{@id}'"
95
95
  heading = @heading.to_s.empty? ? '' : "<h2#{id}>#{@heading}</h2>"
96
96
  @site.all_collections.each do |post|
97
- # @logger.info "#{post.relative_path}: last_modified=#{post.last_modified}(#{post.last_modified.class}) date=#{post.date}(#{post.date.class})"
98
- @logger.info "Error: #{post.relative_path} has no value for last_modified" if post.last_modified.to_s.empty?
97
+ # @logger.debug "#{post.relative_path}: last_modified=#{post.last_modified}(#{post.last_modified.class}) date=#{post.date}(#{post.date.class})"
98
+ @logger.debug "Error: #{post.relative_path} has no value for last_modified" if post.last_modified.to_s.empty?
99
99
  end
100
100
  collection = @site.all_collections.sort(&sort_lambda)
101
101
  <<~END_TEXT
102
102
  #{heading}
103
103
  <div class="posts">
104
104
  #{(collection.map do |post|
105
- @logger.info { " post.last_modified='#{post.last_modified}' @date_column='#{@date_column}'" }
105
+ @logger.debug { " post.last_modified='#{post.last_modified}' @date_column='#{@date_column}'" }
106
106
  date = (@date_column == 'last_modified' ? post.last_modified : post.date).strftime('%Y-%m-%d')
107
107
  draft = post.draft ? "<i class='jekyll_draft'>Draft</i>" : ''
108
108
  href = "<a href='#{post.url}'>#{post.title}</a>"
109
- @logger.info { " date='#{date}' #{post.title}\n" }
109
+ @logger.debug { " date='#{date}' #{post.title}\n" }
110
110
  " <span>#{date}</span><span>#{href}#{draft}</span>"
111
111
  end).join("\n")}
112
112
  </div>
@@ -1,3 +1,3 @@
1
1
  module JekyllAllCollectionsVersion
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_all_collections
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Slinn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-10 00:00:00.000000000 Z
11
+ date: 2023-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll