From f6edefaa2cfac1a33cc71a4cb6f717d78e75916c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Mon, 17 May 2021 15:47:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=AD=A3=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E8=BE=85=E5=8A=A9=E5=87=BD=E6=95=B0=E5=9C=A8=E6=B7=B1=E5=B1=82?= =?UTF-8?q?=E6=AC=A1=E7=9B=AE=E5=BD=95=E4=B8=AD=E7=9A=84=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/helper/uk-paginator.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/helper/uk-paginator.js b/scripts/helper/uk-paginator.js index 3c6541a..75a6c4e 100644 --- a/scripts/helper/uk-paginator.js +++ b/scripts/helper/uk-paginator.js @@ -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(`