import Link from "next/link"; import { listDocuments } from "@mcpedia/core"; export const dynamic = "force-dynamic"; const SECTIONS = ["docs", "writeups", "research", "notes"] as const; export default async function DocsIndexPage() { const all = await listDocuments(); const bySection = SECTIONS.map((section) => ({ section, docs: all.filter((d) => d.section === section), })); return (

All Documents

{bySection.map(({ section, docs }) => (

{section}

{docs.length === 0 ? (

No documents in this section.

) : ( )}
))}
); }