jekyll-paginate-v2-redux 1.7.7 → 1.7.8
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: 1696927d80a45c43019640122649af4c6701ea83
|
4
|
+
data.tar.gz: ecdc51c83ff48eed6f4d216170d43b88c13294bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c3f339a72e7728dd62bd5bca01d27f32f957fc0751d46457f19ea7947371c358b226e8444c15537d02e005f13fff1e54757813a0a3115118db03111e42c554a
|
7
|
+
data.tar.gz: 9086568e9d6895479a09e19314721a776dbf29543e484dbc1ef780b8637d237a8bcc58d180a7a1df95c0de6e396e8fc1beb54c1894969f343b7bdf9480a0f028
|
@@ -53,14 +53,19 @@ module Jekyll
|
|
53
53
|
|
54
54
|
# Request all documents in all collections that the user has requested
|
55
55
|
all_posts = self.get_docs_in_collections(template_config['collection'])
|
56
|
-
|
56
|
+
|
57
|
+
exclude_category = self.array_from_config_string template.data['pagination']['exclude_category']
|
58
|
+
exclude_category_global = self.array_from_config_string default_config['exclude_category']
|
59
|
+
exclude_category = exclude_category.concat(exclude_category_global)
|
60
|
+
|
61
|
+
if exclude_category
|
57
62
|
all_posts = all_posts.select { |post|
|
58
63
|
categories = post.data['categories']
|
59
64
|
if categories.is_a?(String)
|
60
65
|
categories = categories.split(/;|,|\s/)
|
61
66
|
end
|
62
|
-
exclude_category =
|
63
|
-
!categories.include?
|
67
|
+
exclude_category = exclude_category
|
68
|
+
!(categories.any? { |i| exclude_category.include? i })
|
64
69
|
}
|
65
70
|
end
|
66
71
|
|
@@ -85,6 +90,13 @@ module Jekyll
|
|
85
90
|
return templates.size.to_i
|
86
91
|
end # function run
|
87
92
|
|
93
|
+
def array_from_config_string(config_string)
|
94
|
+
if config_string and config_string.is_a?(String)
|
95
|
+
config_string.split(/;|,|\s/)
|
96
|
+
else
|
97
|
+
[]
|
98
|
+
end
|
99
|
+
end
|
88
100
|
#
|
89
101
|
# This function is here to retain the old compatability logic with the jekyll-paginate gem
|
90
102
|
# no changes should be made to this function and it should be retired and deleted after 2018-01-01
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Jekyll
|
2
2
|
module PaginateV2
|
3
|
-
VERSION = "1.7.
|
3
|
+
VERSION = "1.7.8"
|
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.7.
|
5
|
+
# git tag -a v1.7.8 -m "Gem v1.7.8"
|
6
6
|
# git push origin --tags
|
7
7
|
# Yanking a published Gem
|
8
8
|
# gem yank jekyll-paginate-v2 -v VERSION
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-paginate-v2-redux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sverrir Sigmundarson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|