export const dynamic = "force-dynamic";
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { getDsMeta, getDsIntroSegments } from "@/lib/ds";
import { ogForBook } from "@/lib/og";
import { PageHeader } from "@/components/layout/page-header";
import { JsonLd } from "@/components/seo/json-ld";
import { bookJsonLd } from "@/lib/jsonld";
import { Card, CardContent } from "@/components/ui/card";
export function generateMetadata(): Metadata {
return ogForBook("ds");
}
export default async function DsPage() {
const meta = await getDsMeta();
if (!meta) notFound();
const introSegments = await getDsIntroSegments();
return (
← Books
{meta.title}
{meta.subtitle && (
{meta.subtitle}
)}
{meta.author}
{/* Description */}
{meta.description && (
{meta.description}
)}
{/* Front Matter */}
{introSegments.length > 0 && (
Front Matter
{introSegments.map((seg) => (
-
))}
)}
{/* Chapters — hierarchical parent → sub-chapter structure */}
{meta.chapters.map((ch) => (
{ch.number}. {ch.title}
{ch.subChapters.map((sub) => (
-
{sub.title}
))}
))}
);
}