Fix post name

This commit is contained in:
DefectingCat
2022-10-11 09:52:44 +08:00
parent 93cfd9472b
commit 8790b67194
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
---
title: 现代前端的Web应用路由-为React打造一个迷你路由器
title: 自建简易 FaaS
date: '2022-10-10'
tags: [JavaScript, TypeScript]
---

View File

@ -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);