refactor(blog): drive blog and home sections from markdown data

This commit is contained in:
Poyraz Avsever
2026-03-11 11:03:00 +03:00
parent 2fbf1f532d
commit be43edc6a6
10 changed files with 304 additions and 633 deletions
+13 -22
View File
@@ -1,5 +1,3 @@
import { BLOG_ARTICLES, BLOG_CATEGORIES } from "@/data/blog";
import { BLOG_DETAILS } from "@/data/blog-detail";
import { certificates } from "@/data/certificates";
import { EDUCATION } from "@/data/education";
import { EXPERIENCE } from "@/data/experience";
@@ -42,27 +40,20 @@ const socialItems: CommandPaletteItem[] = SOCIAL_LINKS.map((item) => ({
}));
const blogItems: CommandPaletteItem[] = [
...BLOG_DETAILS.map((item) => ({
id: `blog-detail-${item.slug}`,
label: item.title,
href: `/blog/${item.slug}`,
icon: "mdi:post-outline",
keywords: [item.category, item.author, item.excerpt, "blog", "yazı", "article"],
})),
...BLOG_ARTICLES.map((item, index) => ({
id: `blog-article-${item.id}-${index}`,
label: item.title,
href: item.href,
icon: "mdi:file-document-outline",
keywords: [item.category, item.excerpt, item.readTime, "blog", "yazı", "article"],
})),
...BLOG_CATEGORIES.map((item) => ({
id: `blog-category-${item}`,
label: `Kategori: ${item}`,
{
id: "blog-index",
label: "Blog",
href: "/blog",
icon: "mdi:tag-outline",
keywords: [item, "blog", "kategori", "category"],
})),
icon: "mdi:file-document-outline",
keywords: ["blog", "yazı", "article", "post"],
},
{
id: "blog-content-page",
label: "Podcast ve İçerikler",
href: "/content",
icon: "mdi:microphone-outline",
keywords: ["podcast", "yazılım", "masa başı", "içerik", "content"],
},
];
const aboutItems: CommandPaletteItem[] = [
-25
View File
@@ -1,25 +0,0 @@
export const HOME_NEWS = [
{
id: "news-performance",
category: "Technology",
title: "Next.js 16 Released with Major Performance Improvements",
date: "Mar 6, 2026",
image: "/news/performance.svg",
href: "/blog",
},
{
id: "news-design",
category: "Design",
title: "Minimalism in Modern UI: Less Is Truly More",
date: "Mar 5, 2026",
image: "/news/design.svg",
href: "/blog",
},
{
id: "news-launch",
category: "Open Source",
title: "Poyraz UI v1.0 Launched - A Minimal React Component Library",
date: "Mar 4, 2026",
href: "/projects",
},
] as const;