File tree 2 files changed +2
-16
lines changed
2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ module.exports = function(locals) {
8
8
9
9
posts . data . sort ( ( a , b ) => ( b . sticky || 0 ) - ( a . sticky || 0 ) ) ;
10
10
11
- const paginationDir = config . index_generator . pagination_dir || config . pagination_dir || 'page' ;
11
+ const paginationDir = config . pagination_dir || 'page' ;
12
12
const path = config . index_generator . path || '' ;
13
13
14
14
return pagination ( path , posts , {
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ describe('Index generator', () => {
123
123
} ) ;
124
124
} ) ;
125
125
126
- it ( 'custom pagination_dir - global setting ' , ( ) => {
126
+ it ( 'custom pagination_dir' , ( ) => {
127
127
hexo . config . index_generator . per_page = 1 ;
128
128
hexo . config . pagination_dir = 'yo' ;
129
129
@@ -135,18 +135,4 @@ describe('Index generator', () => {
135
135
136
136
} ) ;
137
137
138
- it ( 'custom pagination_dir - plugin setting' , ( ) => {
139
- hexo . config . index_generator . per_page = 1 ;
140
- hexo . config . index_generator . pagination_dir = 'yoyo' ;
141
-
142
- const result = generator ( locals ) ;
143
-
144
- result [ 0 ] . path . should . eql ( '' ) ;
145
- result [ 1 ] . path . should . eql ( 'yoyo/2/' ) ;
146
- result [ 2 ] . path . should . eql ( 'yoyo/3/' ) ;
147
-
148
- // Restore config
149
- hexo . config . index_generator . per_page = 10 ;
150
- hexo . config . index_generator . pagination_dir = 'page' ;
151
- } ) ;
152
138
} ) ;
You can’t perform that action at this time.
0 commit comments