Skip to content

Commit

Permalink
feat(site/blog): add not found page
Browse files Browse the repository at this point in the history
  • Loading branch information
qhanw committed Sep 11, 2023
1 parent 2a7f511 commit 571baf9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions site/blog/app/[slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Props = {
searchParams: { [key: string]: string | string[] | undefined };
};

export async function getPost(params: Props["params"]) {
async function getPost(params: Props["params"]) {
const post = getPostBySlug(params.slug);
const markdown = await remark()
.use(html, { sanitize: false })
Expand Down Expand Up @@ -46,7 +46,7 @@ export async function getPost(params: Props["params"]) {
};
}

export const dynamicParams = false;
export const dynamicParams = true;

export async function generateStaticParams() {
const posts = getAllPosts();
Expand Down
2 changes: 1 addition & 1 deletion site/blog/app/404/page.tsx → site/blog/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export async function generateMetadata() {
return seo({ title: "Not found" });
}

export default function NotFoundPage() {
export default function NotFound() {
return (
<main className="p-24">
<h1 className="mb-16 max-w-xs">Page not found</h1>
Expand Down

1 comment on commit 571baf9

@vercel
Copy link

@vercel vercel bot commented on 571baf9 Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

qhan – ./

qhan-qhanw.vercel.app
qhan-git-main-qhanw.vercel.app
qhan.wang

Please sign in to comment.