Merge pull request #941 from vioao/post_name_support_chinese
Make post name support Non-ASCII characters
This commit is contained in:
commit
7501b2c135
@ -75,9 +75,7 @@ export async function generateMetadata({
|
||||
}
|
||||
|
||||
export const generateStaticParams = async () => {
|
||||
const paths = allBlogs.map((p) => ({ slug: p.slug.split('/') }))
|
||||
|
||||
return paths
|
||||
return allBlogs.map((p) => ({ slug: p.slug.split('/').map((name) => decodeURI(name)) }))
|
||||
}
|
||||
|
||||
export default async function Page({ params }: { params: { slug: string[] } }) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user