export const dynamic = "force-dynamic"; import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { ArrowLeft } from "lucide-react"; import { getDocMeta, readDocContent } from "@/lib/docs"; import { MarkdownViewer } from "@/components/docs/markdown-viewer"; interface DocPageProps { params: Promise<{ slug: string }>; } export async function generateMetadata({ params, }: DocPageProps): Promise { const { slug } = await params; return { title: getDocMeta(slug)?.title ?? "Doc not found" }; } export default async function DocPage({ params }: DocPageProps) { const { slug } = await params; const doc = getDocMeta(slug); if (!doc) notFound(); const content = readDocContent(doc); if (content === null) notFound(); return (
All docs
); }