astro first commit

This commit is contained in:
2024-11-22 00:42:48 +01:00
parent 13eb767fa0
commit d4e9b2027e
156 changed files with 11589 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
---
import { getCollection } 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.slug },
props: post,
}))
}
const post = Astro.props
const { Content } = await post.render()
---
<PageWithTitle title={post.data.title}>
<Content />
</PageWithTitle>