summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2024-12-06 16:43:21 +0800
committerEltrac <hi@guhub.cn>2024-12-06 16:43:21 +0800
commit7f8d6b12330c591e05d625f7a20a7b6ff4b0671f (patch)
treeba0ac1d6b0c407e216fbd11e15d26ac2019c99bb
parent21c9585bba6de158a93cebede2b0e1fe54959d86 (diff)
fix(waline): /to/path and /to/path/ meaning different pages
-rw-r--r--themes/yinyang/layouts/partials/snippets/waline-init.html3
1 files changed, 2 insertions, 1 deletions
diff --git a/themes/yinyang/layouts/partials/snippets/waline-init.html b/themes/yinyang/layouts/partials/snippets/waline-init.html
index 5b3c8963..5a799f2a 100644
--- a/themes/yinyang/layouts/partials/snippets/waline-init.html
+++ b/themes/yinyang/layouts/partials/snippets/waline-init.html
@@ -4,10 +4,11 @@ const options = {
dark: 'auto',
pageview: true,
search: false,
+ path: window.location.pathname.replace(/\/$/,'')
};
if (location.href.includes('localhost') || location.href.includes('127.0.0.1')) {
options.pageview = false;
}
-init(options); \ No newline at end of file
+init(options);