We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cf617e commit 9bc9007Copy full SHA for 9bc9007
1 file changed
src/components/waline/PageInfo.astro
@@ -10,7 +10,9 @@ interface Props {
10
11
const { view, comment, class: className, ...props } = Astro.props
12
13
-const path = Astro.url.pathname
+//部署到 github pages 时,路径会带上 .html 后缀, 导致 waline 统计不到
14
+let path = Astro.url.pathname
15
+if (path.endsWith('.html')) path = path.slice(0, -5)
16
---
17
18
<div class={cn('text-base text-sm text-muted-foreground', className)} {...props}>
0 commit comments