--- import Layout from '@/layouts/Layout.astro' import { checkSlugDuplication } from '@/utils/content.config' import { getCollection } from 'astro:content' export async function getStaticPaths() { const posts = await getCollection('posts') const duplicates = await checkSlugDuplication(posts) if (duplicates.length > 0) { throw new Error(`Slug conflicts found:\n${duplicates.join('\n')}`) } return posts.map(post => ({ params: { slug: post.data.slug || post.slug, }, props: { post }, })) } const { post } = Astro.props const { Content } = await post.render() ---

{post.data.title}