mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2026-11-22 17:23:40 +00:00
astro first commit
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
---
|
||||
import { 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,
|
||||
}))
|
||||
}
|
||||
|
||||
const post = Astro.props
|
||||
const { Content } = await post.render()
|
||||
---
|
||||
|
||||
<BlogPost {...post.data}>
|
||||
<Content />
|
||||
</BlogPost>
|
||||
Reference in New Issue
Block a user