{data.title}
{data.description && ({data.description}
)} {/* Mobile/tablet TOC */} {data.toc && data.toc.length > 0 && (import { source } from "@/lib/source"; import { getMDXComponents } from "@/mdx-components"; import { notFound } from "next/navigation"; import Link from "next/link"; import { ChevronRight } from "lucide-react"; import { cn } from "@/lib/utils"; import { DocTOC, MobileTOC } from "./doc-toc"; const PAGE_ORDER = ["getting-started", "contributing"]; function getDocPages() { return source .getPages() .filter((p) => p.slugs.length > 0) .sort((a, b) => { const ai = PAGE_ORDER.indexOf(a.slugs[0]); const bi = PAGE_ORDER.indexOf(b.slugs[0]); return (ai === -1 ? Infinity : ai) - (bi === -1 ? Infinity : bi); }); } export default async function DocPage(props: { params: Promise<{ slug: string }>; }) { const { slug } = await props.params; const page = source.getPage([slug]); if (!page) notFound(); const data = page.data as any; const MDX = data.body; const allPages = getDocPages(); return (
{data.description}
)} {/* Mobile/tablet TOC */} {data.toc && data.toc.length > 0 && (