jekyll-paginate-v2-redux 1.7.6 → 1.7.7

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: e053ece4702c033c8888d81987ed5e29cf10f659
4
- data.tar.gz: 52a83630ba8d3de3630c57058d673ce2674ef901
3
+ metadata.gz: e88db220e5671a3f8cddef1bd274604f2c820770
4
+ data.tar.gz: d351e77a4462f20e73896566d079184ef68959a8
5
5
  SHA512:
6
- metadata.gz: 9e63dd021fa294df25a9321c72c861de8e286d9bdb01c4ce2f88675af134049cceaafbca950ac42a57f47e9aca178d9c4bb2d88606b46f62ec9a5822fd7f3936
7
- data.tar.gz: 2cb740ca3629ed4b8f9b9b9d4fb5c5310d447eb0a4889c6fc2f5a3941d9d932009855507fc41d42ffac1974da755b2edd8f2c953a1ce16b64c8b0aa7735d13e8
6
+ metadata.gz: 8a56f26979c65680f7e806dffb9c841be3bda0e01c1aa500768fc7a04e5fb689e6676b08e9f39e0d897d88f3107b6c5f53a913ae51867d90fa7f76bf3ce3e066
7
+ data.tar.gz: 70890d0e3b08084f947c0307368432fb71ac652d408a1b72080bd3c54391ab423a7e007eabaa8e82714853dbed77ed839e399b141c56e3f5cdf0cbdc235c7f74
@@ -53,11 +53,23 @@ 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
+ if template.data['pagination']['exclude_category']
57
+ all_posts = all_posts.select { |post|
58
+ categories = post.data['categories']
59
+ if categories.is_a?(String)
60
+ categories = categories.split(/;|,|\s/)
61
+ end
62
+ exclude_category = template.data['pagination']['exclude_category']
63
+ !categories.include? template.data['pagination']['exclude_category']
64
+ }
65
+ end
56
66
 
57
67
  # Create the necessary indexes for the posts
58
68
  all_categories = PaginationIndexer.index_posts_by(all_posts, 'categories')
59
69
  all_categories['posts'] = all_posts; # Populate a category for all posts (this is here for backward compatibility, do not use this as it will be decommissioned 2018-01-01)
60
70
  # (this is a default and must not be used in the category system)
71
+ # Jekyll.logger.info all_categories['posts'][0].data
72
+ # Jekyll.logger.info template.data['pagination']
61
73
  all_tags = PaginationIndexer.index_posts_by(all_posts, 'tags')
62
74
  all_locales = PaginationIndexer.index_posts_by(all_posts, 'locale')
63
75
 
@@ -356,3 +368,4 @@ module Jekyll
356
368
 
357
369
  end # module PaginateV2
358
370
  end # module Jekyll
371
+
@@ -1,8 +1,8 @@
1
1
  module Jekyll
2
2
  module PaginateV2
3
- VERSION = "1.7.6"
3
+ VERSION = "1.7.7"
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.6 -m "Gem v1.7.6"
5
+ # git tag -a v1.7.7 -m "Gem v1.7.7"
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.6
4
+ version: 1.7.7
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-06-28 00:00:00.000000000 Z
11
+ date: 2017-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll