feat: add metadata generator for remaining books

This commit is contained in:
gosangam
2026-05-07 19:40:55 +05:30
parent 5cb5827f1c
commit 037072618b
45 changed files with 342 additions and 0 deletions
+14
View File
@@ -1,11 +1,25 @@
export const dynamic = "force-dynamic";
import type { Metadata } from "next";
import Link from "next/link";
import { notFound } from "next/navigation";
import { getOtherDocumentMeta, slugToBookCode } from "@/lib/other-documents";
import { ogForOtherDocument } from "@/lib/og";
import { PageHeader } from "@/components/page-header";
import { Card, CardContent } from "@/components/ui/card";
export async function generateMetadata({
params,
}: {
params: Promise<{ slug: string }>;
}): Promise<Metadata> {
const { slug } = await params;
const bookCode = slugToBookCode(slug);
const meta = await getOtherDocumentMeta(bookCode);
const title = meta?.title ?? slug;
return ogForOtherDocument(title);
}
export default async function OtherDocumentIndexPage({
params,
}: {