feat(geo): llms.txt, RSS, IndexNow, Article yazar/görsel, bölüm sayfasına veri özeti, vakıf bursu yazısı
All checks were successful
Deploy / deploy (push) Successful in 6m16s
All checks were successful
Deploy / deploy (push) Successful in 6m16s
GEO araştırması (docs/arastirma/2026-09-24-geo-seo) Dalga 1-2 uygulaması: - /llms.txt ve /feed.xml route'ları (getAllRehberler'den otomatik), head'de RSS linki - Article JSON-LD: author, image, mainEntityOfPage, publisher logo; görünür 'Yazan' satırı - robots: ClaudeBot ayrı grupta Crawl-delay 1 - scripts/indexnow.ts (pnpm indexnow) + public anahtar dosyası - bölüm sayfası açılışı veriden üretilen özgü cümleler (il/program/tür/kontenjan, taban aralığı, yıllık yön) - ana sayfa fiyat iddiasına kaynak; iki yazıda 23.000 -> 21.000+; beş yazıya 'Kısa cevap' açılışı - yeni yazı: vakif-universitesi-bursu-kesilir-mi (ÖSYM 2026 kılavuzu + YÖK ücret esasları) - YAYIN-KUYRUGU: IndexNow adımı ve aylık AI görünürlük rutini Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
54
src/app/feed.xml/route.ts
Normal file
54
src/app/feed.xml/route.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import { getAllRehberler } from "@/lib/rehber";
|
||||
import { SITE_NAME, SITE_URL } from "@/lib/seo";
|
||||
|
||||
/**
|
||||
* Rehber yazılarının RSS 2.0 beslemesi. Kök layout metadata'sındaki
|
||||
* alternates.types bu adresi <link rel="alternate"> olarak <head>'e yazar.
|
||||
* Cache Components altında istek verisi okunmadığı için prerender edilir.
|
||||
*/
|
||||
function xmlKacis(metin: string): string {
|
||||
return metin
|
||||
.replaceAll("&", "&")
|
||||
.replaceAll("<", "<")
|
||||
.replaceAll(">", ">")
|
||||
.replaceAll('"', """);
|
||||
}
|
||||
|
||||
/** "YYYY-MM-DD" → RFC 822 (RSS pubDate). Gün 09:00 Türkiye saati kabul edilir. */
|
||||
function rfc822(iso: string): string {
|
||||
return new Date(`${iso}T09:00:00+03:00`).toUTCString();
|
||||
}
|
||||
|
||||
export async function GET() {
|
||||
const yazilar = getAllRehberler();
|
||||
const enYeni = yazilar[0]?.guncelleme ?? yazilar[0]?.tarih;
|
||||
|
||||
const items = yazilar
|
||||
.map(
|
||||
(y) => ` <item>
|
||||
<title>${xmlKacis(y.baslik)}</title>
|
||||
<link>${SITE_URL}/rehber/${y.slug}</link>
|
||||
<guid isPermaLink="true">${SITE_URL}/rehber/${y.slug}</guid>
|
||||
<description>${xmlKacis(y.aciklama)}</description>
|
||||
<pubDate>${rfc822(y.tarih)}</pubDate>
|
||||
</item>`,
|
||||
)
|
||||
.join("\n");
|
||||
|
||||
const xml = `<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>${SITE_NAME} Tercih Rehberi</title>
|
||||
<link>${SITE_URL}/rehber</link>
|
||||
<description>YKS tercih dönemi rehberi: veriye dayalı, öğrenci diliyle yazılar.</description>
|
||||
<language>tr</language>
|
||||
<atom:link href="${SITE_URL}/feed.xml" rel="self" type="application/rss+xml" />
|
||||
${enYeni ? ` <lastBuildDate>${rfc822(enYeni)}</lastBuildDate>\n` : ""}${items}
|
||||
</channel>
|
||||
</rss>
|
||||
`;
|
||||
|
||||
return new Response(xml, {
|
||||
headers: { "Content-Type": "application/rss+xml; charset=utf-8" },
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user