This commit is contained in:
2026-06-28 19:09:30 +02:00
parent 8b43e14dc7
commit 4817ccff2a
11 changed files with 1715 additions and 1098 deletions
+3 -3
View File
@@ -1,17 +1,17 @@
---
import { getCollection } from 'astro:content'
import { getCollection, render as renderEntry } 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 },
params: { slug: post.id },
props: post,
}))
}
const post = Astro.props
const { Content, headings, remarkPluginFrontmatter } = await post.render()
const { Content, headings, remarkPluginFrontmatter } = await renderEntry(post)
---
<BlogPost {...post.data} {headings} readingTime={remarkPluginFrontmatter.readingTime}>