feat(seo): implement google analytics, sitemap, robots and json-ld structured data

This commit is contained in:
Poyraz Avsever
2026-03-30 11:28:05 +03:00
parent e08b9ae708
commit a23665ee9e
6 changed files with 162 additions and 3 deletions
+16 -1
View File
@@ -1,7 +1,10 @@
import { notFound } from "next/navigation";
import { BlogDetailContent } from "@/components/blog-detail-content";
import { ArticleJsonLd } from "@/components/json-ld";
import { getBlogDetailBySlug } from "@/data/blog-detail";
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://poyrazavsever.com";
type BlogDetailPageProps = {
params: Promise<{ slug: string }>;
};
@@ -14,5 +17,17 @@ export default async function BlogDetailPage({ params }: BlogDetailPageProps) {
notFound();
}
return <BlogDetailContent post={post} />;
return (
<>
<ArticleJsonLd
title={post.title}
description={post.excerpt}
url={`${SITE_URL}/blog/${post.slug}`}
image={post.coverImage}
datePublished={post.date}
authorName={post.author}
/>
<BlogDetailContent post={post} />
</>
);
}