import Link from "next/link"; import { getPostData, getAllPostIds } from "@/lib/posts"; import type { PostData } from "@/lib/posts"; import Window from "../../../components/window"; import { MDXRemote } from "next-mdx-remote/rsc"; interface PageProps { params: { slug: string; }; } // This function tells Next.js which blog posts exist at build time export async function generateStaticParams() { const paths = getAllPostIds(); return paths.map((path) => ({ slug: path.params.slug })); } // Generates metadata (like the title tag) for each blog post page export async function generateMetadata({ params }: PageProps) { const postData = await getPostData(params.slug); return { title: `${postData.title} | Gabriel's Kaszewski Blog`, }; } export default async function Post({ params }: PageProps) { // Fetch the specific post's content based on the URL slug const postData: PostData = await getPostData(params.slug); return (