jekyll-paginate-v2 1.8.1 → 1.8.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: 9e177a112ac16ec487200097f2fbb3b84f28890e
4
- data.tar.gz: 20b1004193f7a51e063f0319662977ea7836dd8a
3
+ metadata.gz: 2a7da34c28f9aa75d455021554bcd12dc1efd8ea
4
+ data.tar.gz: 19a37f789f35926c1a150389d9bb45bdc7162f64
5
5
  SHA512:
6
- metadata.gz: 730ee61ecb4b2fabb4cef34d50c510ddc8594c1d7e1f6e0253041095ff0988c89877a7d4b84910d678d534e8d689bc779d38553846429099fad43aabfd66fabb
7
- data.tar.gz: 86cecc1ec96fd8c2b29ee87e70d5afeb9b2485f05d0a15181cd356addfb6b8708c95db17867f1e1fe1490531468553bfe69861104707ba228ec664c849b1e910
6
+ metadata.gz: cedfe9b72ca218c52648461e37b8c74b1e061113cfb55278cff2d74d3b1ed55c58d32e9929ea9f971823d5cfddc514304999d65266f03ac83461e871baf8cc3e
7
+ data.tar.gz: a81ac4c6c64925a6eaa346ca925e44f92abd948e3b70f1f57780088c441bff736de67ae81ff1992a7cfb13df426c32bc6e62e8605769287c077bf003e5dea522
@@ -2,6 +2,7 @@
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'jekyll-paginate-v2/version'
5
+ require 'date'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
8
  spec.name = "jekyll-paginate-v2"
@@ -230,12 +230,14 @@ module Jekyll
230
230
  puts "Pagination: ".rjust(20) + "Rolling through the date fields for all documents"
231
231
  end
232
232
  for p in using_posts
233
- tmp_date = p.date
234
- if( !tmp_date || tmp_date.nil? )
235
- if @debug
236
- puts "Pagination: ".rjust(20) + "Explicitly assigning date for doc: #{p.data['title']} | #{p.path}"
233
+ if p.respond_to?('date')
234
+ tmp_date = p.date
235
+ if( !tmp_date || tmp_date.nil? )
236
+ if @debug
237
+ puts "Pagination: ".rjust(20) + "Explicitly assigning date for doc: #{p.data['title']} | #{p.path}"
238
+ end
239
+ p.date = File.mtime(p.path)
237
240
  end
238
- p.date = File.mtime(p.path)
239
241
  end
240
242
  end
241
243
 
@@ -355,4 +357,4 @@ module Jekyll
355
357
  end # class PaginationV2
356
358
 
357
359
  end # module PaginateV2
358
- end # module Jekyll
360
+ end # module Jekyll
@@ -13,9 +13,6 @@ module Jekyll
13
13
  @site = page_to_copy.site
14
14
  @base = ''
15
15
  @url = ''
16
- @name = 'index.html'
17
-
18
- self.process(@name) # Creates the basename and ext member values
19
16
 
20
17
  # Only need to copy the data part of the page as it already contains the layout information
21
18
  #self.data = Marshal.load(Marshal.dump(page_to_copy.data)) # Deep copying, http://stackoverflow.com/a/8206537/779521
@@ -33,6 +30,13 @@ module Jekyll
33
30
  # Store the current page and total page numbers in the pagination_info construct
34
31
  self.data['pagination_info'] = {"curr_page" => cur_page_nr, 'total_pages' => total_pages }
35
32
 
33
+ # Set the page extension
34
+ extension = self.data['pagination']['extension']
35
+ extension = extension.nil? ? '.html': '.' + extension
36
+ @name = 'index' + extension
37
+
38
+ self.process(@name) # Creates the basename and ext member values
39
+
36
40
  # Perform some validation that is also performed in Jekyll::Page
37
41
  validate_data! page_to_copy.path
38
42
  validate_permalink! page_to_copy.path
@@ -47,4 +51,4 @@ module Jekyll
47
51
  end # class PaginationPage
48
52
 
49
53
  end # module PaginateV2
50
- end # module Jekyll
54
+ end # module Jekyll
@@ -1,8 +1,8 @@
1
1
  module Jekyll
2
2
  module PaginateV2
3
- VERSION = "1.8.1"
3
+ VERSION = "1.8.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.8.1 -m "Gem v1.8.1"
5
+ # git tag -a v1.8.2 -m "Gem v1.8.2"
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.8.1
4
+ version: 1.8.2
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-24 00:00:00.000000000 Z
11
+ date: 2017-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll