export const dynamic = "force-dynamic"; import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { getNodMeta, getNodIntroSegments } from "@/lib/nod"; 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("nod"); } const PART_LABELS: Record = { 1: "Part One", 2: "Part Two", 3: "Part Three", 4: "Part Four", }; export default async function NodPage() { const meta = await getNodMeta(); if (!meta) notFound(); const introSegments = await getNodIntroSegments(); return (
← Books

{meta.title}

{meta.subtitle}

{meta.author}

{/* Description */} {meta.description && (

{meta.description}

)} {/* Front Matter */} {introSegments && introSegments.length > 0 && (

Front Matter

    {introSegments.map((seg) => (
  • {seg.title}

  • ))}
)} {/* Parts & Chapters */} {meta.parts.map((part) => { const partChapters = part.chapters .map((num) => meta.chapters.find((ch) => ch.number === num)) .filter(Boolean) as { number: number; title: string }[]; return (

{PART_LABELS[part.number] ?? `Part ${part.number}`}

    {partChapters.map((ch) => (
  • Chapter {ch.number}

    {ch.title}

  • ))}
); })} {/* Concluding Words */}

Conclusion

  • Concluding Words

); }