blob: 9162df44672b89ba3efa230fbb9f0b7d8ea84499 [file] [log] [blame]
---
import { type CollectionEntry, getCollection } from 'astro:content';
import BlogPost from '../../layouts/BlogPost.astro';
export async function getStaticPaths() {
const posts = await getCollection('post');
return posts.map((post: { slug: any; }) => ({
params: { slug: post.slug },
props: post,
}));
}
type Props = CollectionEntry<'post'>;
const post = Astro.props;
const { Content } = await post.render();
---
<BlogPost {...post.data}>
<Content />
</BlogPost>