mirror of
https://github.com/rjNemo/orbital-orbit
synced 2026-06-12 04:46:40 +00:00
19 lines
453 B
Text
19 lines
453 B
Text
---
|
|
import { getCollection, render } from "astro:content";
|
|
import BlogPostLayout from "../../layouts/BlogPostLayout.astro";
|
|
|
|
export async function getStaticPaths() {
|
|
const posts = await getCollection("blog");
|
|
return posts.map((post) => ({
|
|
params: { slug: post.id },
|
|
props: { post },
|
|
}));
|
|
}
|
|
|
|
const { post } = Astro.props;
|
|
const { Content } = await render(post);
|
|
---
|
|
|
|
<BlogPostLayout frontmatter={post.data}>
|
|
<Content />
|
|
</BlogPostLayout>
|