diff --git a/app/(site)/blog/[slug]/page.tsx b/app/(site)/blog/[slug]/page.tsx index 62a3ffa..259e878 100644 --- a/app/(site)/blog/[slug]/page.tsx +++ b/app/(site)/blog/[slug]/page.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { ArrowLeft, Calendar } from "lucide-react"; -import { marked } from "marked"; +import { renderContent } from "@/lib/content-render"; import { getPostBySlug } from "@/lib/data"; import { buildMetadata } from "@/lib/seo"; @@ -36,7 +36,7 @@ export default async function BlogPostPage({ const post = await getPostBySlug(slug); if (!post || post.status !== "published") notFound(); - const html = post.content ? marked.parse(post.content, { async: false }) as string : ""; + const html = renderContent(post.content); return (
diff --git a/app/(site)/hizmetler/[slug]/page.tsx b/app/(site)/hizmetler/[slug]/page.tsx index 4a39bd7..53f392c 100644 --- a/app/(site)/hizmetler/[slug]/page.tsx +++ b/app/(site)/hizmetler/[slug]/page.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { ArrowLeft, ArrowRight, CheckCircle2 } from "lucide-react"; -import { marked } from "marked"; +import { renderContent } from "@/lib/content-render"; import { getServiceBySlug, listProjects } from "@/lib/data"; import { buildMetadata } from "@/lib/seo"; import { Icon } from "@/components/icon"; @@ -55,9 +55,7 @@ export default async function ServiceDetailPage({ ]); const faqItems = parseFaq(service.faq); - const html = service.content - ? (marked.parse(service.content, { async: false }) as string) - : ""; + const html = renderContent(service.content); return ( <> diff --git a/app/(site)/projeler/[slug]/page.tsx b/app/(site)/projeler/[slug]/page.tsx index 9622ec2..2cde4bb 100644 --- a/app/(site)/projeler/[slug]/page.tsx +++ b/app/(site)/projeler/[slug]/page.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { ArrowLeft, Building2, Calendar, Clock, ExternalLink, Tag } from "lucide-react"; -import { marked } from "marked"; +import { renderContent } from "@/lib/content-render"; import { getProjectBySlug, listProjects } from "@/lib/data"; import { buildMetadata } from "@/lib/seo"; import { Gallery } from "@/components/gallery"; @@ -54,9 +54,7 @@ export default async function ProjectDetailPage({ const project = await getProjectBySlug(slug); if (!project) notFound(); - const html = project.content - ? (marked.parse(project.content, { async: false }) as string) - : ""; + const html = renderContent(project.content); const metrics = parseMetrics(project.metrics); diff --git a/app/(site)/sektor/[slug]/page.tsx b/app/(site)/sektor/[slug]/page.tsx index e21028e..571ec8d 100644 --- a/app/(site)/sektor/[slug]/page.tsx +++ b/app/(site)/sektor/[slug]/page.tsx @@ -3,7 +3,7 @@ import Link from "next/link"; import type { Metadata } from "next"; import { notFound } from "next/navigation"; import { ArrowRight, ArrowLeft, CheckCircle2 } from "lucide-react"; -import { marked } from "marked"; +import { renderContent } from "@/lib/content-render"; import { getIndustryBySlug, listProjects, @@ -65,9 +65,7 @@ export default async function IndustryPage({ ]); const faqItems = parseFaq(industry.faq); - const html = industry.content - ? (marked.parse(industry.content, { async: false }) as string) - : ""; + const html = renderContent(industry.content); return ( <> diff --git a/app/admin/(protected)/blog/form.tsx b/app/admin/(protected)/blog/form.tsx index 797ce75..d1b3683 100644 --- a/app/admin/(protected)/blog/form.tsx +++ b/app/admin/(protected)/blog/form.tsx @@ -9,6 +9,7 @@ import { Textarea, } from "@/components/admin/form"; import { MediaPicker } from "@/components/admin/media-picker"; +import { RichEditor } from "@/components/admin/rich-editor"; import { saveBlogPost } from "@/lib/admin-actions"; import type { BlogPostRow } from "@/lib/types"; import { Save } from "lucide-react"; @@ -75,13 +76,19 @@ export function BlogForm({ post }: { post?: BlogPostRow }) { rows={3} placeholder="Liste/kart görünümünde gösterilecek kısa özet" /> -