import { fetchPage } from "@/lib/fetchers"; import { RenderBlock } from "@/components/registry"; import { notFound } from "next/navigation"; export const revalidate = 60; // ISR: 60秒后重新验证 export default async function Page({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params; const page = await fetchPage(slug); if (!page) { return notFound(); } return (
{/* 页面标题 */}

{page.title}

{page.description && (

{page.description}

)}
{/* 渲染所有块 */}
{page.blocks.map((block) => ( ))}
); }