import type { Metadata } from "next"; import Link from "next/link"; import { notFound } from "next/navigation"; import { ChevronRight } from "lucide-react"; import { getAllRehberSlugs, getAllRehberler, getRehber } from "@/lib/rehber"; import { JsonLd, articleJsonLd, breadcrumbJsonLd } from "@/lib/seo"; import { CtaSiraForm } from "@/components/cta-sira-form"; import { ElCizimiSema } from "@/components/el-cizimi-sema"; import { RehberKapak } from "@/components/rehber-kapak"; import { SiteFooter } from "@/components/site-footer"; export function generateStaticParams() { const slugs = getAllRehberSlugs(); if (slugs.length === 0) { throw new Error("rehber: content/rehber altında hiç makale yok"); } return slugs.map((slug) => ({ slug })); } export async function generateMetadata({ params, }: { params: Promise<{ slug: string }>; }): Promise { const { slug } = await params; const yazi = getRehber(slug); if (!yazi) return {}; return { title: yazi.baslik, description: yazi.aciklama, alternates: { canonical: `/rehber/${slug}` }, openGraph: { type: "article", title: yazi.baslik, description: yazi.aciklama, publishedTime: yazi.tarih, }, }; } export default async function RehberYaziPage({ params, }: { params: Promise<{ slug: string }>; }) { const { slug } = await params; const yazi = getRehber(slug); if (!yazi) notFound(); const digerYazilar = getAllRehberler() .filter((y) => y.slug !== slug) .slice(0, 4); return ( <>

{yazi.baslik}

{yazi.aciklama}

{yazi.parcalar.map((parca, i) => parca.tip === "html" ? (
) : ( ), )}
{digerYazilar.length > 0 ? (

Diğer rehber yazıları

    {digerYazilar.map((y) => (
  • {y.baslik}
  • ))}
) : null}
); }