Updated blog post definition

This commit is contained in:
Anton Pogrebnjak
2025-02-09 01:12:55 +01:00
parent 76cb1c417a
commit a3e299f175
6 changed files with 300 additions and 113 deletions

View File

@@ -1,5 +1,5 @@
---
import { type CollectionEntry, getCollection } from 'astro:content';
import { getCollection } from 'astro:content';
import BlogPost from '../../layouts/BlogPost.astro';
import { render } from 'astro:content';
import { convertCollectionPost, convertPost, type Post } from '../../models/Post';
@@ -11,7 +11,7 @@ export async function getStaticPaths() {
props: post,
}));
}
type Props = CollectionEntry<'projects'>;
type Props = Post;
const post: Post = Astro.props;
const { Content } = await render(convertCollectionPost(post));