🚨 Fix type issues

This commit is contained in:
2025-08-31 23:00:38 -04:00
parent 81a3a5c662
commit 808bec174e
9 changed files with 98 additions and 63 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
---
import { getCollection } from 'astro:content';
import { getCollection, render } from 'astro:content';
import Layout from '@layouts/Layout.astro';
import BlogHeader from '@components/BlogHeader.astro';
@@ -8,7 +8,7 @@ import Tags from '@components/Tags.astro';
export async function getStaticPaths() {
const posts = await getCollection('blog');
return posts.map((post) => ({
params: { slug: post.slug },
params: { slug: post.id },
props: { post },
}));
}
@@ -17,10 +17,11 @@ const { post } = Astro.props;
const { data } = post;
const { Content } = await post.render();
const { Content } = await render(post);
---
<Layout title={data.title}>
<h1></h1>
<article>
<BlogHeader title={data.title} date={data.pubDate} />
<Content />