import { Navigation } from "@/components/navigation"; import { getBlogPosts, getBlogPost } from "@/lib/content"; import ReactMarkdown from "react-markdown"; import remarkGfm from "remark-gfm"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; interface BlogPostPageProps { params: Promise<{ slug: string }>; } export async function generateStaticParams() { const posts = getBlogPosts(); return posts.map((post) => ({ slug: post.slug, })); } export async function generateMetadata({ params, }: BlogPostPageProps): Promise { const { slug } = await params; const post = getBlogPost(slug); if (!post) { return { title: "Post Not Found", }; } return { title: `${post.title}`, description: post.excerpt, }; } export default async function BlogPostPage({ params }: BlogPostPageProps) { const { slug } = await params; const post = getBlogPost(slug); if (!post) { notFound(); } return (

{post.title}

{post.excerpt}

{post.content}
); }