import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { getBookMeta } from "@/lib/api"; 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"; import { Badge } from "@/components/ui/badge"; type VolumeInfo = { number: number; totalChapters: number; }; export function generateMetadata(): Metadata { return ogForBook("kb"); } export default async function KbPage() { const meta = await getBookMeta("kb"); if (!meta) notFound(); const title = meta.title as string; const author = meta.author as string; const description = meta.description as string | undefined; const volumes = meta.volumes as VolumeInfo[]; return (
← Books

{title}

{author}

{description && (

{description}

)}
    {volumes.map((vol) => (
  • Volume {vol.number}

    {vol.totalChapters} chapters

  • ))}
); }