import { notFound } from 'next/navigation' import { MDXRemote } from 'next-mdx-remote/rsc' import { getPostData, getAllPostSlugs } from '@/lib/blog' import BlogHeader from '@/components/BlogHeader' import BlogFooter from '@/components/BlogFooter' import Link from 'next/link' import remarkGfm from 'remark-gfm' import rehypeHighlight from 'rehype-highlight' import rehypeSlug from 'rehype-slug' import rehypeAutolinkHeadings from 'rehype-autolink-headings' interface PostPageProps { params: Promise<{ slug: string }> } export async function generateStaticParams() { const slugs = getAllPostSlugs() return slugs.map(({ params }) => ({ slug: params.slug })) } export async function generateMetadata({ params }: PostPageProps) { const { slug } = await params const post = getPostData(slug) if (!post) { return { title: 'Post Not Found - CHORUS PING!' } } return { title: `${post.title} - CHORUS PING!`, description: post.description, openGraph: { title: post.title, description: post.description, type: 'article', publishedTime: post.date, authors: [post.author?.name || 'CHORUS Team'], tags: post.tags, }, } } export default async function PostPage({ params }: PostPageProps) { const { slug } = await params const post = getPostData(slug) if (!post) { notFound() } const formattedDate = new Date(post.date).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) const mdxOptions = { mdxOptions: { remarkPlugins: [remarkGfm], rehypePlugins: [ rehypeHighlight, rehypeSlug, [rehypeAutolinkHeadings, { behavior: 'wrap' } as any] ] as any, } } return (
{/* Back link */}
Back to all posts
{/* Article header */}
{post.tags.map((tag) => ( {tag} ))}

{post.title}

{post.description}

{post.author.name.charAt(0)}

{post.author.name}

{post.author.role && (

{post.author.role}

)}
{post.readingTime} min read
{/* Article content */}
{/* Article footer */}

Join the CHORUS Community

Stay updated with the latest insights on contextual AI and agent orchestration. Join our waitlist to get early access to the CHORUS platform.

Join Waitlist
) }