jekyll_all_collections 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +7 -0
- data/jekyll_all_collections.gemspec +1 -1
- data/lib/all_collections_tag.rb +6 -6
- data/lib/jekyll_all_collections/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98b56451934bb754055fc2f68ab03a6824f58c360eb88f739afac26c4f9a8c1e
|
4
|
+
data.tar.gz: f4295f066d3913b85d920648d66f10e9b58da55f7fd1d67681f002235aa5e249
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a103a3208ae1142f98ff5a6316c01502a59b1c96cf6fc2ff3c094b6200d8adb6b16d9b8d585cf28aa8448b0c2fb5df68ffdf9b01d431e21243636b1b9e8ad1e2
|
7
|
+
data.tar.gz: 60093b3825053c854cc7ef89b6ad88bd97d8a31baa231c9386e16b2810a9266df7c6a94d189260471b2d29aeba9c2dcfeb9c6faf27b81f92df5dcfde558e11e0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 0.2.2 / 2023-02-12
|
2
|
+
* Updated dependency `'jekyll_plugin_support', '~> 0.4.0'`
|
3
|
+
|
4
|
+
## 0.2.1 / 2023-02-12
|
5
|
+
* Reduced the verbosity of log output from `info` to `debug`
|
6
|
+
|
1
7
|
## 0.2.0 / 2023-02-04
|
2
8
|
* Returns Array[APage] instead of a collection of different types of objects.
|
3
9
|
* 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.
|
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.2
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.4.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.4.0
|
55
55
|
description: 'Provides a collection of all collections in site.all_collections.
|
56
56
|
|
57
57
|
'
|