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


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

	return servers.map((s)=> ({
		params: { slug: s.slug },
		props: s,
	}));
}

type Props = CollectionEntry<'servers'>;

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

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