Skip to content

Commit 7501b2c

Browse files
authored
Merge pull request #941 from vioao/post_name_support_chinese
Make post name support Non-ASCII characters
2 parents c6f5f6c + d948934 commit 7501b2c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/blog/[...slug]/page.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ export async function generateMetadata({
7575
}
7676

7777
export const generateStaticParams = async () => {
78-
const paths = allBlogs.map((p) => ({ slug: p.slug.split('/') }))
79-
80-
return paths
78+
return allBlogs.map((p) => ({ slug: p.slug.split('/').map((name) => decodeURI(name)) }))
8179
}
8280

8381
export default async function Page({ params }: { params: { slug: string[] } }) {

0 commit comments

Comments
 (0)