fix:修正分页辅助函数在深层次目录中的工作。
This commit is contained in:
parent
332c38a97a
commit
f6edefaa2c
|
@ -10,6 +10,12 @@ hexo.extend.helper.register("uk_paginator", function(option) {
|
|||
mainClasses: [],
|
||||
itemClasses: [],
|
||||
}, option);
|
||||
const pagePathReplaced = options.pagePath.replace('/', '\/').replace('%d', '\\d+');
|
||||
console.log(pagePathReplaced);
|
||||
const regPagePath = new RegExp(pagePathReplaced);
|
||||
console.log(regPagePath);
|
||||
options.base = options.base.replace(regPagePath, '');
|
||||
console.dir(options);
|
||||
|
||||
let pageStructure = [];
|
||||
pageStructure.push(`<ul class="uk-pagination ${options.mainClasses.join(' ')}">`);
|
||||
|
|
Loading…
Reference in New Issue
Block a user