jekyll-paginate-v2 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf3d484abb23816a1d7b0ddff858bfe8bd9910b0
|
4
|
+
data.tar.gz: 38b5e268d53c4e8e5b3a02d5c46ed68178758f41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c954800a9aec9157258a7bc2b9f19055d8066c9db7d043b670e1a51dfc9e32f8558bfcb7e782350775334096c14031efa8618cfa38d0b62ddd6be62c939919d
|
7
|
+
data.tar.gz: 8041aa50ed32b79c0ae9ecb8f87a2ad86b30dbf25793bd9af0cbff3155233603bb753e0f4f2aada8c6b8f0db51afe5fb45d3937cff75c94392b514243c639f4f
|
@@ -165,6 +165,13 @@ module Jekyll
|
|
165
165
|
end
|
166
166
|
end
|
167
167
|
end
|
168
|
+
|
169
|
+
def _debug_print_filtering_info(filter_name, before_count, after_count)
|
170
|
+
# Debug print the config
|
171
|
+
if @debug
|
172
|
+
puts "Pagination: ".rjust(20) + " Filtering by: "+filter_name.to_s.ljust(9) + " " + before_count.to_s.rjust(3) + " => " + after_count.to_s
|
173
|
+
end
|
174
|
+
end
|
168
175
|
|
169
176
|
#
|
170
177
|
# Rolls through all the pages passed in and finds all pages that have pagination enabled on them.
|
@@ -196,9 +203,15 @@ module Jekyll
|
|
196
203
|
using_posts = all_posts
|
197
204
|
|
198
205
|
# Now start filtering out any posts that the user doesn't want included in the pagination
|
206
|
+
before = using_posts.size.to_i
|
199
207
|
using_posts = PaginationIndexer.read_config_value_and_filter_posts(config, 'category', using_posts, all_categories)
|
208
|
+
self._debug_print_filtering_info('Category', before, using_posts.size.to_i)
|
209
|
+
before = using_posts.size.to_i
|
200
210
|
using_posts = PaginationIndexer.read_config_value_and_filter_posts(config, 'tag', using_posts, all_tags)
|
211
|
+
self._debug_print_filtering_info('Tag', before, using_posts.size.to_i)
|
212
|
+
before = using_posts.size.to_i
|
201
213
|
using_posts = PaginationIndexer.read_config_value_and_filter_posts(config, 'locale', using_posts, all_locales)
|
214
|
+
self._debug_print_filtering_info('Locale', before, using_posts.size.to_i)
|
202
215
|
|
203
216
|
# Apply sorting to the posts if configured, any field for the post is available for sorting
|
204
217
|
if config['sort_field']
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Jekyll
|
2
2
|
module PaginateV2
|
3
|
-
VERSION = "1.5.
|
3
|
+
VERSION = "1.5.2"
|
4
4
|
# When modifying remember to issue a new tag command in git before committing, then push the new tag
|
5
|
-
# git tag -a v1.5.
|
5
|
+
# git tag -a v1.5.2 -m "Gem v1.5.2"
|
6
6
|
# git push origin --tags
|
7
7
|
end # module PaginateV2
|
8
8
|
end # module Jekyll
|
@@ -8,7 +8,7 @@ module Jekyll::PaginateV2::Generator
|
|
8
8
|
DEFAULT.must_include 'collection'
|
9
9
|
DEFAULT.must_include 'per_page'
|
10
10
|
DEFAULT.must_include 'permalink'
|
11
|
-
DEFAULT.must_include '
|
11
|
+
DEFAULT.must_include 'title'
|
12
12
|
DEFAULT.must_include 'page_num'
|
13
13
|
DEFAULT.must_include 'sort_reverse'
|
14
14
|
DEFAULT.must_include 'sort_field'
|
@@ -22,7 +22,7 @@ module Jekyll::PaginateV2::Generator
|
|
22
22
|
DEFAULT['collection'].must_equal 'posts'
|
23
23
|
DEFAULT['per_page'].must_equal 10
|
24
24
|
DEFAULT['permalink'].must_equal '/page:num/'
|
25
|
-
DEFAULT['
|
25
|
+
DEFAULT['title'].must_equal ':title - page :num'
|
26
26
|
DEFAULT['page_num'].must_equal 1
|
27
27
|
DEFAULT['sort_reverse'].must_equal false
|
28
28
|
DEFAULT['sort_field'].must_equal 'date'
|