feat(seo): implement google analytics, sitemap, robots and json-ld structured data
This commit is contained in:
@@ -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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user