feat: add astro app

This commit is contained in:
Mauricio Siu
2024-06-30 20:10:19 -06:00
parent fc06afaa1e
commit c251b5957b
34 changed files with 5384 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
import { type CollectionEntry, getCollection } from 'astro:content';
import BlogPost from '../../layouts/BlogPost.astro';
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({
params: { slug: post.slug },
props: post,
}));
}
type Props = CollectionEntry<'blog'>;
const post = Astro.props;
const { Content } = await post.render();
---
<BlogPost {...post.data}>
<Content />
</BlogPost>