mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-16 01:01:38 +00:00
Fix post name
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 现代前端的Web应用路由-为React打造一个迷你路由器
|
||||
title: 自建简易 FaaS
|
||||
date: '2022-10-10'
|
||||
tags: [JavaScript, TypeScript]
|
||||
---
|
||||
|
@ -53,10 +53,11 @@ export const getStaticProps: GetStaticProps<{
|
||||
tocLength: number;
|
||||
}> = async ({ params }) => {
|
||||
const slug = params?.slug?.toString();
|
||||
if (!slug)
|
||||
if (!slug) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
const post = await readSinglePost(slug);
|
||||
const toc = generateToc(post);
|
||||
|
Reference in New Issue
Block a user