25 lines
579 B
Text
25 lines
579 B
Text
|
---
|
||
|
import BaseLayout from "../../layouts/BaseLayout.astro";
|
||
|
import { type CollectionEntry, getCollection } from "astro:content";
|
||
|
// import BlogPost from "../../layouts/BlogPost.astro";
|
||
|
|
||
|
export async function getStaticPaths() {
|
||
|
const posts = await getCollection("posts");
|
||
|
return posts.map((post) => ({
|
||
|
params: { slug: post.slug },
|
||
|
props: post,
|
||
|
}));
|
||
|
}
|
||
|
|
||
|
type Props = CollectionEntry<"posts">;
|
||
|
|
||
|
const post = Astro.props;
|
||
|
const { Content } = await post.render();
|
||
|
---
|
||
|
|
||
|
<BaseLayout>
|
||
|
<!-- <BlogPost {...post.data}> -->
|
||
|
<Content />
|
||
|
<!-- </BlogPost> -->
|
||
|
</BaseLayout>
|