We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccbd7d4 commit f4d656bCopy full SHA for f4d656b
app/[...slug]/page.tsx
@@ -8,6 +8,7 @@ import { allPages } from 'contentlayer/generated'
8
import type { Pages } from 'contentlayer/generated'
9
import siteMetadata from '@/data/siteMetadata'
10
import { components } from '@/components/markdown/MDXComponents'
11
+import { notFound } from 'next/navigation'
12
13
import PageLayout from '@/layouts/posts/PageLayout'
14
const defaultLayout = 'PageLayout'
@@ -24,7 +25,7 @@ export async function generateMetadata({
24
25
const page = allPages.find((p) => p.slug === slug)
26
27
if (!page) {
- return
28
+ return notFound()
29
}
30
let imageList = [siteMetadata.socialBanner]
31
if (page.image) {
0 commit comments