Skip to content

Commit 1229e16

Browse files
authored
Update [category].astro
1 parent cb98d8a commit 1229e16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/archive/category/[category].astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export async function getStaticPaths() {
88
return categories.map(category => {
99
return {
1010
params: {
11-
category: category.name,
11+
category: encodeURIComponent(category.name),
1212
},
1313
}
1414
})
1515
}
1616
17-
const category = Astro.params.category as string
17+
const category = decodeURIComponent(Astro.params.category as string);
1818
---
1919

2020
<MainGridLayout title='归档' description='归档'>

0 commit comments

Comments
 (0)