firq-dev-website/src/pages/blog/[...slug].astro

18 lines
349 B
Text
Raw Normal View History

2024-07-19 22:52:15 +02:00
---
import { getCollection } from 'astro:content'
export async function getStaticPaths() {
const blogEntries = await getCollection('blog')
return blogEntries.map((entry) => ({
params: { slug: entry.slug },
props: { entry },
}))
}
const { entry } = Astro.props
const { Content } = await entry.render()
---
<Content />