--- import { getCollection } from 'astro:content'; import BlogPostLayout from '../../layouts/BlogPostLayout.astro'; // Using BlogPostLayout // 1. Generate a path for every blog post export async function getStaticPaths() { const postEntries = await getCollection('posts'); return postEntries.map(entry => ({ params: { slug: entry.slug }, props: { entry }, })); } // 2. For your template, you can get the entry directly from the prop const { entry } = Astro.props; const { Content } = await entry.render(); ---