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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +7 -0
- data/lib/all_collections_tag.rb +6 -6
- data/lib/jekyll_all_collections/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 811fb81472784f03d1de69afa5a65af4219bd03108b64465a1b47ef133b44bf1
|
4
|
+
data.tar.gz: b164ab779c40d4341450fa30ac890d98fb122cf385fa27598b13c293b2da86b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d3bdc533fda83895ec8e11df167ae6fb66ffdc7e38d4e4e2a5f4499deeb4ec10f2fd601e5b7c10036e6578eab8f82f11b3ca045c369dec07254b7f53fade0b3
|
7
|
+
data.tar.gz: 2de1652307226cfb5907efbb54adf5e32987353922cce422a5e95fa49c82528babcd26b26124167822af72d41005778bb85bf77e549bdd151b82375b14372631
|
data/CHANGELOG.md
CHANGED
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.
|
data/lib/all_collections_tag.rb
CHANGED
@@ -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.
|
38
|
-
@logger.
|
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.
|
98
|
-
@logger.
|
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.
|
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.
|
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>
|
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.
|
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-
|
11
|
+
date: 2023-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|