2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -253,9 +253,13 @@ def self.disable_other_plugins(config)
253
253
# Disable archive pages from jekyll-archives
254
254
config [ 'jekyll-archives' ] = nil
255
255
256
- # Disable paginatio from jekyll-paginate
256
+ # Disable pagination from jekyll-paginate
257
257
config [ 'paginate' ] = nil
258
258
259
+ # Disable pagination for jekyll-paginate-v2
260
+ config [ 'pagination' ] = { } unless config [ 'pagination' ] . is_a? ( Hash )
261
+ config [ 'pagination' ] [ 'enabled' ] = false
262
+
259
263
# Disable tags from jekyll-tagging
260
264
config [ 'tag_page_dir' ] = nil
261
265
config [ 'tag_page_layout' ] = nil
Original file line number Diff line number Diff line change 442
442
it { should include ( 'paginate' => nil ) }
443
443
end
444
444
445
+ context 'disable jekyll-paginate-v2' do
446
+ context 'with no pagination key' do
447
+ it { should include ( 'pagination' => { 'enabled' => false } ) ; }
448
+ end
449
+ context 'with a pagination key' do
450
+ let ( :config ) { { 'pagination' => { 'foo' => 'bar' } } }
451
+ it {
452
+ should include (
453
+ 'pagination' => { 'foo' => 'bar' , 'enabled' => false }
454
+ )
455
+ }
456
+ end
457
+ end
458
+
445
459
context 'disable jekyll-tagging' do
446
460
it { should include ( 'tag_page_dir' => nil ) }
447
461
it { should include ( 'tag_page_layout' => nil ) }
0 commit comments