mirror of
https://github.com/cupcakearmy/nicco.io.git
synced 2026-07-26 17:26:09 +00:00
20 lines
452 B
Plaintext
20 lines
452 B
Plaintext
---
|
|
import { getCollection, render as renderEntry } from 'astro:content'
|
|
import PageWithTitle from '../layouts/PageWithTitle.astro'
|
|
|
|
export async function getStaticPaths() {
|
|
const posts = await getCollection('page')
|
|
return posts.map((post) => ({
|
|
params: { page: post.id },
|
|
props: post,
|
|
}))
|
|
}
|
|
|
|
const post = Astro.props
|
|
const { Content } = await renderEntry(post)
|
|
---
|
|
|
|
<PageWithTitle title={post.data.title}>
|
|
<Content />
|
|
</PageWithTitle>
|