deniz bektaş

This commit is contained in:
2026-04-03 16:20:51 +03:00
parent d0cd1c7ee3
commit fb6933edd0
53 changed files with 4742 additions and 98 deletions

42
app/api/rss/all/route.ts Normal file
View File

@@ -0,0 +1,42 @@
import { NextResponse } from "next/server";
import { getAllPosts } from "@/lib/posts";
const SITE_URL = "https://denizbektas.com.tr";
export async function GET() {
const posts = getAllPosts();
const items = posts
.map(
(post) => `
<item>
<title><![CDATA[${post.title}]]></title>
<link>${SITE_URL}/${post.category}/${post.slug}</link>
<guid>${SITE_URL}/${post.category}/${post.slug}</guid>
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
<description><![CDATA[${post.excerpt}]]></description>
<category>${post.category}</category>
</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>Deniz Bektaş — Tüm İçerikler</title>
<link>${SITE_URL}</link>
<description>Siber güvenlik, red team ve kişisel yazılar</description>
<language>tr</language>
<atom:link href="${SITE_URL}/api/rss/all" rel="self" type="application/rss+xml"/>
<lastBuildDate>${new Date().toUTCString()}</lastBuildDate>
${items}
</channel>
</rss>`;
return new NextResponse(xml, {
headers: {
"Content-Type": "application/xml; charset=utf-8",
"Cache-Control": "public, max-age=3600",
},
});
}

38
app/api/rss/blog/route.ts Normal file
View File

@@ -0,0 +1,38 @@
import { NextResponse } from "next/server";
import { getPosts } from "@/lib/posts";
const SITE_URL = "https://denizbektas.com.tr";
export async function GET() {
const posts = getPosts("blog");
const items = posts
.map(
(post) => `
<item>
<title><![CDATA[${post.title}]]></title>
<link>${SITE_URL}/blog/${post.slug}</link>
<guid>${SITE_URL}/blog/${post.slug}</guid>
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
<description><![CDATA[${post.excerpt}]]></description>
</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>Deniz Bektaş — Kişisel Blog</title>
<link>${SITE_URL}/blog</link>
<description>Kişisel blog yazıları</description>
<language>tr</language>
<atom:link href="${SITE_URL}/api/rss/blog" rel="self" type="application/rss+xml"/>
<lastBuildDate>${new Date().toUTCString()}</lastBuildDate>
${items}
</channel>
</rss>`;
return new NextResponse(xml, {
headers: { "Content-Type": "application/xml; charset=utf-8", "Cache-Control": "public, max-age=3600" },
});
}

View File

@@ -0,0 +1,38 @@
import { NextResponse } from "next/server";
import { getPosts } from "@/lib/posts";
const SITE_URL = "https://denizbektas.com.tr";
export async function GET() {
const posts = getPosts("infosec");
const items = posts
.map(
(post) => `
<item>
<title><![CDATA[${post.title}]]></title>
<link>${SITE_URL}/infosec/${post.slug}</link>
<guid>${SITE_URL}/infosec/${post.slug}</guid>
<pubDate>${new Date(post.date).toUTCString()}</pubDate>
<description><![CDATA[${post.excerpt}]]></description>
</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>Deniz Bektaş — Infosec Posts</title>
<link>${SITE_URL}/infosec</link>
<description>Teknik siber güvenlik yazıları</description>
<language>tr</language>
<atom:link href="${SITE_URL}/api/rss/infosec" rel="self" type="application/rss+xml"/>
<lastBuildDate>${new Date().toUTCString()}</lastBuildDate>
${items}
</channel>
</rss>`;
return new NextResponse(xml, {
headers: { "Content-Type": "application/xml; charset=utf-8", "Cache-Control": "public, max-age=3600" },
});
}

View File

@@ -0,0 +1,23 @@
import { NextResponse } from "next/server";
const SITE_URL = "https://denizbektas.com.tr";
export async function GET() {
const xml = `<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Deniz Bektaş Podcast</title>
<link>${SITE_URL}/podcast</link>
<description>Türkçe siber güvenlik podcast&apos;i — red team, pentest ve hacker kültürü</description>
<language>tr</language>
<itunes:author>denizbektas</itunes:author>
<itunes:category text="Technology"/>
<atom:link href="${SITE_URL}/api/rss/podcast" rel="self" type="application/rss+xml"/>
<lastBuildDate>${new Date().toUTCString()}</lastBuildDate>
</channel>
</rss>`;
return new NextResponse(xml, {
headers: { "Content-Type": "application/xml; charset=utf-8", "Cache-Control": "public, max-age=3600" },
});
}