mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
Merge branch 'master' into dev
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 现代前端的Web应用路由-为React打造一个迷你路由器
|
||||
title: 自建简易 FaaS
|
||||
date: '2022-10-10'
|
||||
tags: [JavaScript, TypeScript]
|
||||
---
|
||||
|
@ -11,6 +11,7 @@ const nextConfig = {
|
||||
images: isExport ? { unoptimized: true } : {},
|
||||
experimental: {
|
||||
// runtime: 'nodejs',
|
||||
largePageDataBytes: 512 * 1000,
|
||||
},
|
||||
compiler: {
|
||||
removeConsole: process.env.NODE_ENV === 'production',
|
||||
|
@ -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