import Link from "next/link"; import { notFound } from "next/navigation"; import PageShell from "@/components/page-shell"; import GuaFooter from "@/components/learn/gua-footer"; import MarkdownContent from "@/components/learn/markdown-content"; import { getGuaName, getGuaNumber, listGuaMarks, readLearnMarkdown, stripFrontmatter, } from "@/lib/content/zhouyi"; export async function generateStaticParams() { const marks = await listGuaMarks("simplified"); return marks.map((guaMark) => ({ guaMark })); } export default async function GuaOtherDetailPage({ params, }: { params: Promise<{ guaMark: string }>; }) { const { guaMark } = await params; const marks = await listGuaMarks("simplified"); if (!marks.includes(guaMark)) { notFound(); } const raw = await readLearnMarkdown(guaMark, "simplified"); const content = stripFrontmatter(raw); return (
← 返回简体总览
第 {getGuaNumber(guaMark)} 卦 · {getGuaName(guaMark)}
); }