jekyll-paginate-v2 1.9.0 → 1.9.1

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
  SHA1:
3
- metadata.gz: d2c5d1cedeea26a437e352ed736ea9f794e2b9c3
4
- data.tar.gz: b566918809647d4dbc92aef957a8c30f70a17acc
3
+ metadata.gz: 24170ee95f3de77a471c81f08e58f83c034221be
4
+ data.tar.gz: e3b5f53cdac7ed6bb44765a8f0f1521e137fdb26
5
5
  SHA512:
6
- metadata.gz: 39e3bfcbe0350ab850b2881f5c14507f82f36c910372fd2eb1e1fcd3270115f6f8779c125aa147d4b3a190a6fa91eb70cad5daf68f39704d0518995eb1c24792
7
- data.tar.gz: 858eb0f571516a94a5926c40b804ec62c8d28ed5032b2ced95780cfa9371498ecd3b3219a8cfffbe02c382a7b41ac4b73ac008f2dcb9a900801f8fc7f83ee69d
6
+ metadata.gz: c0fa098d8199206b2ca2b5764149e9647c70cfc0e5d2cdf261ffbcb0ec17734772f618730bd3e9fe04a3a70905b34b8139af512c4495fa21a0b9c8d83696f94f
7
+ data.tar.gz: a04720418e0ce53f02ece44f3cac28723bc66c759367d0d5c3d49b803a9bd85f8bbd70f0412f2cdb22b0f13619f571d36cad59659db7ca20706cfca10bb7b17e
data/Gemfile CHANGED
@@ -5,4 +5,10 @@ gemspec
5
5
 
6
6
  if ENV["JEKYLL_VERSION"]
7
7
  gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
8
- end
8
+ end
9
+
10
+ # adding dev-dependencies to Gemfile (instead of gemspec) allows calling
11
+ # `bundle exec [executable] [options]` more easily.
12
+ group :test do
13
+ gem "rubocop", "~> 0.51.0"
14
+ end
data/README.md CHANGED
@@ -3,13 +3,14 @@
3
3
  Pagination gem built specially for Jekyll 3 and newer that is fully backwards compatable and serves as an enhanced replacement for the previously built-in [jekyll-paginate gem](https://github.com/jekyll/jekyll-paginate). View it on [rubygems.org](https://rubygems.org/gems/jekyll-paginate-v2).
4
4
 
5
5
  [![Gem](https://img.shields.io/gem/v/jekyll-paginate-v2.svg)](https://rubygems.org/gems/jekyll-paginate-v2)
6
+ [![Join the chat at https://gitter.im/jekyll-paginate-v2/Lobby](https://badges.gitter.im/jekyll-paginate-v2/Lobby.svg)](https://gitter.im/jekyll-paginate-v2/Lobby)
6
7
  [![Build Status](https://travis-ci.org/sverrirs/jekyll-paginate-v2.svg?branch=master)](https://travis-ci.org/sverrirs/jekyll-paginate-v2)
7
8
  [![Dependency Status](https://gemnasium.com/badges/github.com/sverrirs/jekyll-paginate-v2.svg)](https://gemnasium.com/github.com/sverrirs/jekyll-paginate-v2)
8
9
  [![Code Climate](https://codeclimate.com/github/sverrirs/jekyll-paginate-v2/badges/gpa.svg)](https://codeclimate.com/github/sverrirs/jekyll-paginate-v2)
9
10
  [![security](https://hakiri.io/github/sverrirs/jekyll-paginate-v2/master.svg)](https://hakiri.io/github/sverrirs/jekyll-paginate-v2/master)
10
11
  [![Gem](https://img.shields.io/gem/dt/jekyll-paginate-v2.svg)](https://rubygems.org/gems/jekyll-paginate-v2)
11
12
 
12
- Reach me at the [project issues](https://github.com/sverrirs/jekyll-paginate-v2/issues) section or via email at [jekyll@sverrirs.com](mailto:jekyll@sverrirs.com).
13
+ Reach me at the [project issues](https://github.com/sverrirs/jekyll-paginate-v2/issues) section or via email at [jekyll@sverrirs.com](mailto:jekyll@sverrirs.com), you can also get in touch on the project's [Glitter chat room](https://gitter.im/jekyll-paginate-v2/Lobby).
13
14
 
14
15
  > The code was based on the original design of [jekyll-paginate](https://github.com/jekyll/jekyll-paginate) and features were sourced from discussions such as [#27](https://github.com/jekyll/jekyll-paginate/issues/27) (thanks [Günter Kits](https://github.com/gynter)).
15
16
 
@@ -24,6 +25,10 @@ Reach me at the [project issues](https://github.com/sverrirs/jekyll-paginate-v2/
24
25
 
25
26
  :heart:
26
27
 
28
+ <a target='_blank' rel='nofollow' href='https://app.codesponsor.io/link/zzB7QVjdsbLjtaFcQie3TDxC/sverrirs/jekyll-paginate-v2'>
29
+ <img alt='Sponsor' width='888' height='68' src='https://app.codesponsor.io/embed/zzB7QVjdsbLjtaFcQie3TDxC/sverrirs/jekyll-paginate-v2.svg' />
30
+ </a>
31
+
27
32
  ## Installation
28
33
 
29
34
  ```
@@ -74,4 +79,4 @@ If you don't want to open issues here on Github, send me your feedback by email
74
79
  7. Push to the branch (`git push origin my-new-feature`)
75
80
  8. Create new Pull Request
76
81
 
77
- Note: This project uses [semantic versioning](http://semver.org/).
82
+ Note: This project uses [semantic versioning](http://semver.org/).
@@ -267,6 +267,9 @@ module Jekyll
267
267
  indexPageExt = Utils.ensure_leading_dot(config['extension'])
268
268
  indexPageWithExt = indexPageName + indexPageExt
269
269
 
270
+ # In case there are no (visible) posts, generate the index file anyway
271
+ total_pages = 1 if total_pages.zero?
272
+
270
273
  # Now for each pagination page create it and configure the ranges for the collection
271
274
  # This .pager member is a built in thing in Jekyll and defines the paginator implementation
272
275
  # Simpy override to use mine
@@ -84,6 +84,16 @@ module Jekyll
84
84
  return a.downcase <=> b.downcase
85
85
  end
86
86
 
87
+ if a.nil? && !b.nil?
88
+ return -1
89
+ elsif !a.nil? && b.nil?
90
+ return 1
91
+ end
92
+
93
+ if a.respond_to?('to_datetime') && b.respond_to?('to_datetime')
94
+ return a.to_datetime <=> b.to_datetime
95
+ end
96
+
87
97
  # By default use the built in sorting for the data type
88
98
  return a <=> b
89
99
  end
@@ -117,4 +127,4 @@ module Jekyll
117
127
  end
118
128
 
119
129
  end # module PaginateV2
120
- end # module Jekyll
130
+ end # module Jekyll
@@ -1,8 +1,8 @@
1
1
  module Jekyll
2
2
  module PaginateV2
3
- VERSION = "1.9.0"
3
+ VERSION = "1.9.1"
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.9.0 -m "Gem v1.9.0"
5
+ # git tag -a v1.9.1 -m "Gem v1.9.1"
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
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
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-09-29 00:00:00.000000000 Z
11
+ date: 2018-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll