summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2024-12-06 16:52:41 +0800
committerEltrac <hi@guhub.cn>2024-12-06 16:52:41 +0800
commit6e833475f827f810d77458055684723432d68ed9 (patch)
tree0ffab23470dceb9055723b8aaa9e2ce3c31e0b52
parent7f8d6b12330c591e05d625f7a20a7b6ff4b0671f (diff)
fix(waline): incorrectly configured path attribute
-rw-r--r--themes/yinyang/layouts/partials/snippets/waline-init.html7
1 files changed, 5 insertions, 2 deletions
diff --git a/themes/yinyang/layouts/partials/snippets/waline-init.html b/themes/yinyang/layouts/partials/snippets/waline-init.html
index 5a799f2a..65590344 100644
--- a/themes/yinyang/layouts/partials/snippets/waline-init.html
+++ b/themes/yinyang/layouts/partials/snippets/waline-init.html
@@ -3,12 +3,15 @@ const options = {
serverURL: 'https://waline.geedea.pro',
dark: 'auto',
pageview: true,
- search: false,
- path: window.location.pathname.replace(/\/$/,'')
+ search: false
};
if (location.href.includes('localhost') || location.href.includes('127.0.0.1')) {
options.pageview = false;
}
+if (!window.location.pathname.endsWith('/')) {
+ options.path = window.location.pathname + '/'
+}
+
init(options);