---
import { type CollectionEntry, getCollection } from 'astro:content';
import BlogPost from '../../layouts/BlogPost.astro';


export async function getStaticPaths() {
	const posts = await getCollection('homelab');

	return posts.map((post)=> ({
		params: { slug: post.slug },
		props: post,
	}));
}

type Props = CollectionEntry<'homelab'>;

const post = Astro.props;
const { Content } = await post.render();
---

<BlogPost {...post.data}>
	<a href="/homelab">
		<h5>&lt--</h5>
	</a>
	<Content />
</BlogPost>