Files
andwati-nextgen/src/app/reading/[slug]/opengraph-image.tsx
T
andwati 63007a1c09 Rebuild site in Tailwind to match adammaj.com layout with andwati content
- Port adammaj.com layout, sidebar and 3D bookshelf from Chakra to Tailwind v4,
  matched to measured pixel values
- Pages: About, Writing, Reading (bookshelf), Portfolio; content exported to
  markdown with YAML frontmatter, KaTeX math, callouts and YouTube embeds
- Shiki (github-light) code highlighting via rehype-pretty-code
- SEO: per-page metadata and canonicals, JSON-LD, generated OG images,
  sitemap, robots, RSS/JSON feeds, llms.txt
- Umami analytics via PUBLIC_UMAMI_SCRIPT_URL / PUBLIC_UMAMI_WEBSITE_ID
- Prettier + cspell for content, husky/lint-staged pre-commit hook
- Multi-stage Dockerfile (Node 24, pnpm, standalone output) for Dokploy
- Remove unused Chakra, emotion, framer-motion, posthog, next-seo and MDX deps
2026-09-30 12:38:09 +03:00

20 lines
515 B
TypeScript

import { getBooks } from "@/lib/content";
import { ogContentType, ogImage, ogSize } from "@/lib/og";
export const size = ogSize;
export const contentType = ogContentType;
export function generateStaticParams() {
return getBooks().map((b) => ({ slug: b.slug }));
}
export default async function Image({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const book = getBooks().find((b) => b.slug === slug);
return ogImage(book?.data.title ?? "Reading", "Reading");
}