j1-paginator 2021.1.1 → 2022.1.0

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: bf74f1bba29c33242d08fb9734ecddc619c7506473c334e0a8707c5e3682445c
4
- data.tar.gz: f090acdcaa7691776d8b3f6b46fb579a978c5176bcc529475fda69483450d2b6
3
+ metadata.gz: b57da5d2b46bfa78119ebb00408a848b79a9158cbbc60d76452a71519f95396f
4
+ data.tar.gz: '087a122fd833dbec1799d28ecfdc8cd7e8b5b39adbdfdbaf6c63d33c91169e32'
5
5
  SHA512:
6
- metadata.gz: 86d5e86ddee5e965afecf4d40821aea07f3b43f2736bb0ea8632368a0f6205a304047a858db51549aadbd6827dd93b6de0c308a05fd69d217fa4ff97c156714c
7
- data.tar.gz: 65ed6b9de9139909302e44c0175466ae97bd8f60c3de033c5d51f6bd52b6070b5c8afc93438a53bb6104f076ddd5bfdabce7dd37bce62577d0fd0411a9bf574a
6
+ metadata.gz: d4ccfa8efc29501b4100ee3a5ed4e88a8f5dee113cb280b499d0a66caeded2257d36ad10c42cf646442599932cfffaf506df057b8eef89ade93f43813e4cd4e9
7
+ data.tar.gz: 76bf1fa8850ee9de3890648ca2cc62c0b888ad8033cb9ffdf0fe3346aa510aa27e59b939636ddf9906fa1b89e71154a9fd08a01b7a2226b1cb3f699df72efebc
@@ -30,7 +30,7 @@ module Jekyll
30
30
 
31
31
  # If disabled then don't do anything
32
32
  if !autopage_config['enabled'] || autopage_config['enabled'].nil?
33
- Jekyll.logger.info "J1 Paginator:","autopages, disabled|not configured"
33
+ Jekyll.logger.info "J1 Paginator:", "generate auto pages: disabled"
34
34
  return
35
35
  end
36
36
 
@@ -91,7 +91,7 @@ module Jekyll
91
91
  end
92
92
  end
93
93
  else
94
- Jekyll.logger.info "J1 Paginator:","autopages, #{configkey_name} pages are disabled|not configured"
94
+ Jekyll.logger.info "J1 Paginator:","autopages, #{configkey_name} pages are disabled"
95
95
  end
96
96
  end
97
97
  end
@@ -1,19 +1,19 @@
1
1
  module Jekyll
2
2
  module J1Paginator::Generator
3
-
3
+
4
4
  #
5
5
  # The main entry point into the generator, called by Jekyll
6
- # this function extracts all the necessary information from the jekyll end and passes it into the pagination
6
+ # this function extracts all the necessary information from the jekyll end and passes it into the pagination
7
7
  # logic. Additionally it also contains all site specific actions that the pagination logic needs access to
8
8
  # (such as how to create new pages)
9
- #
9
+ #
10
10
  class PaginationGenerator < Generator
11
11
  # This generator is safe from arbitrary code execution.
12
12
  safe true
13
13
 
14
14
  # This generator should be passive with regard to its execution
15
15
  priority :lowest
16
-
16
+
17
17
  # Generate paginated pages if necessary (Default entry point)
18
18
  # site - The Site.
19
19
  #
@@ -43,8 +43,10 @@ module Jekyll
43
43
 
44
44
  # If disabled then simply quit
45
45
  if !default_config['enabled']
46
- Jekyll.logger.info "J1 Paginator:","plugin disabled"
46
+ Jekyll.logger.info "J1 Paginator:","disabled"
47
47
  return
48
+ else
49
+ Jekyll.logger.info "J1 Paginator:","enabled"
48
50
  end
49
51
 
50
52
  # Generate the AutoPages first
@@ -55,9 +57,10 @@ module Jekyll
55
57
  Jekyll::Deprecator.deprecation_message "J1 Paginator: The 'title_suffix' configuration has been deprecated. Please use 'title'. See https://github.com/sverrirs/j1-paginator/blob/master/README-GENERATOR.md#site-configuration"
56
58
  end
57
59
 
58
- Jekyll.logger.info "J1 Paginator:","pagination enabled, start processing ..."
60
+ Jekyll.logger.info "J1 Paginator:","generate paginator pages: enabled"
61
+ # Jekyll.logger.info "J1 Paginator:","generate paginator pages: start processing ..."
59
62
 
60
- ################ 0 ####################
63
+ ################ 0 ####################
61
64
  # Get all pages in the site (this will be used to find the pagination templates)
62
65
  all_pages = site.pages
63
66
 
@@ -104,7 +107,7 @@ module Jekyll
104
107
 
105
108
  # lambda that removes a page from the site pages list
106
109
  page_remove_lambda = lambda do | page_to_remove |
107
- site.pages.delete_if {|page| page == page_to_remove }
110
+ site.pages.delete_if {|page| page == page_to_remove }
108
111
  end
109
112
 
110
113
  # Create a proc that will delegate logging
@@ -125,10 +128,11 @@ module Jekyll
125
128
  # proc and site data
126
129
  model = PaginationModel.new(logging_lambda, page_add_lambda, page_remove_lambda, collection_by_name_lambda)
127
130
  count = model.run(default_config, all_pages, site_title)
128
- Jekyll.logger.info "J1 Paginator:", "finished, processed #{count} pagination page|s"
131
+ Jekyll.logger.info "J1 Paginator:", "generate paginator pages: #{count} page|s generated"
132
+ # Jekyll.logger.info "J1 Paginator:", "generate paginator pages: finished"
129
133
 
130
134
  end # function generate
131
135
  end # class PaginationGenerator
132
136
 
133
137
  end # module J1Paginator
134
- end # module Jekyll
138
+ end # module Jekyll
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module J1Paginator
3
- VERSION = '2021.1.1'
3
+ VERSION = '2022.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j1-paginator
3
3
  version: !ruby/object:Gem::Version
4
- version: 2021.1.1
4
+ version: 2022.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sverrir Sigmundarson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-03 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.1.4
135
+ rubygems_version: 3.3.7
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Pagination Generator for Jekyll 3