feat(agenda): add weekly agenda experience
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { notFound } from "next/navigation";
|
||||
import { notFound, permanentRedirect } from "next/navigation";
|
||||
import { Metadata } from "next";
|
||||
import { BlogDetailContent } from "@/components/blog-detail-content";
|
||||
import { ArticleJsonLd } from "@/components/json-ld";
|
||||
import { getBlogDetailBySlug } from "@/data/blog-detail";
|
||||
import { isNewsletterCategory } from "@/data/blog";
|
||||
|
||||
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || "https://poyrazavsever.com";
|
||||
|
||||
@@ -58,6 +59,11 @@ export default async function BlogDetailPage({ params }: BlogDetailPageProps) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
if (isNewsletterCategory(post.category)) {
|
||||
const localePrefix = locale === "tr" ? "" : `/${locale}`;
|
||||
permanentRedirect(`${localePrefix}/agenda/${post.slug}`);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<ArticleJsonLd
|
||||
|
||||
Reference in New Issue
Block a user