feat(rehber): guncelleme alanı → sitemap/JSON-LD/OG/görünür tarih

Frontmatter'a isteğe bağlı `guncelleme` alanı geldi ve uçtan uca akıyor:
sitemap lastmod (yazı + /rehber dizini), Article JSON-LD dateModified,
og:article modified_time ve makale başlığının altındaki görünür tarih
satırı. `tarih`/`guncelleme` YYYY-AA-GG değilse ya da güncelleme yayından
önceyse build kırılır. Tarih metni saat diliminden bağımsız `trTarih` ile
üretilir.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
bilalgursen
2026-09-21 04:47:29 +03:00
parent a9ea0bf49b
commit d9e125c5de
5 changed files with 106 additions and 8 deletions

View File

@@ -8,6 +8,7 @@ import {
breadcrumbJsonLd,
sayfaMetadata,
} from "@/lib/seo";
import { trTarih } from "@/lib/tarih";
import { CtaSiraForm } from "@/features/sihirbaz/components/cta-sira-form";
import { ElCizimiSema } from "./el-cizimi-sema";
import { RehberKapak } from "./rehber-kapak";
@@ -29,7 +30,11 @@ export function rehberYaziMetadata(slug: string): Metadata {
title: yazi.baslik,
description: yazi.aciklama,
path: `/rehber/${slug}`,
openGraph: { type: "article", publishedTime: yazi.tarih },
openGraph: {
type: "article",
publishedTime: yazi.tarih,
modifiedTime: yazi.guncelleme ?? yazi.tarih,
},
});
}
@@ -49,6 +54,7 @@ export function RehberMakale({ slug }: { slug: string }) {
description: yazi.aciklama,
path: `/rehber/${slug}`,
datePublished: yazi.tarih,
dateModified: yazi.guncelleme,
})}
/>
<JsonLd
@@ -67,6 +73,15 @@ export function RehberMakale({ slug }: { slug: string }) {
<p className="mt-3 text-base leading-7 text-slate-600">
{yazi.aciklama}
</p>
<p className="mt-3 text-xs text-slate-500">
Yayın: <time dateTime={yazi.tarih}>{trTarih(yazi.tarih)}</time>
{yazi.guncelleme ? (
<>
{" · "}Güncelleme:{" "}
<time dateTime={yazi.guncelleme}>{trTarih(yazi.guncelleme)}</time>
</>
) : null}
</p>
<div
className="mt-8 text-[15px] leading-7 text-slate-700
[&_h2]:mt-10 [&_h2]:font-heading [&_h2]:text-xl [&_h2]:font-bold [&_h2]:text-slate-900