Files
kolaytercih/src/app/bolum/[slug]/opengraph-image.tsx
bilalgursen 3fa5cab906 feat(veri): katalog/OG/rapor metinleri yılı veri-yillari.ts'ten okur — 2026 yüklemesi P-C
- "2025 yerleştirme" → SON_YIL, "2026 tercihleri" → TERCIH_YILI, başlık yılı → BASLIK_YILI
- yazdırılabilir rapor dipnotu: "2021–2025" → VERI_ARALIGI
- meraklısına 1. bölüm: efektif sıra açıklaması yılsız
- KATALOG_VERI_TARIHI: 2026-09-21 (2026 verisinin çekim tarihi)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-21 16:53:42 +03:00

33 lines
930 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { getAllBolumler } from "@/lib/katalog";
import {
createOgSayfaImage,
OG_CONTENT_TYPE,
OG_SIZE,
} from "@/lib/og-sayfa";
import { SON_YIL, TERCIH_YILI } from "@/lib/veri-yillari";
export const alt = "Bölüm taban puanları ve sıralamaları — KolayTercih";
export const size = OG_SIZE;
export const contentType = OG_CONTENT_TYPE;
export default async function Image({
params,
}: {
params: Promise<{ slug: string }>;
}) {
const { slug } = await params;
const bolum = getAllBolumler().find((b) => b.slug === slug);
const ad = bolum?.ad ?? "Bölüm";
const programSayisi = bolum?.programSayisi;
const sayi =
programSayisi != null
? `${programSayisi.toLocaleString("tr-TR")} program · `
: "";
return createOgSayfaImage({
eyebrow: "Bölüm",
title: `${ad} taban puanları`,
description: `${sayi}${SON_YIL} yerleştirme verileri · ${TERCIH_YILI} tercih rehberi`,
});
}