import type { Metadata } from "next"; import Link from "next/link"; import { Mdx } from "@/components/Mdx"; import { readLine } from "@/lib/books"; import { coverExists, getBooks, spineFor, summarize } from "@/lib/content"; export const metadata: Metadata = { title: "Reading", description: "Books and papers I have read, with ratings and notes.", alternates: { canonical: "/reading" }, }; export default function ReadingIndex() { return (

Reading

{getBooks().map((b, i) => { const cover = coverExists(b.data.coverImage) ? b.data.coverImage : undefined; const { spineColor, textColor } = spineFor(b.data.title); const summary = summarize(b.content); return (
0 ? "mt-5" : undefined}> {i > 0 &&
}
{cover ? ( // biome-ignore lint/performance/noImgElement: small local cover {b.data.title} ) : (
{b.data.title}
)}

{b.data.title}

{b.data.authors?.length ? (

{b.data.authors.join(", ")}

) : null}

{readLine(b.data)}

{summary && (
)}
); })}
); }