2024-08-18 19:06:50 +02:00
|
|
|
---
|
2026-02-18 18:11:29 +01:00
|
|
|
import { getCollection, render } from "astro:content";
|
2024-08-18 19:06:50 +02:00
|
|
|
|
|
|
|
|
export async function getStaticPaths() {
|
2026-01-07 03:03:42 +01:00
|
|
|
const postEntries = await getCollection("blog");
|
2024-08-18 19:06:50 +02:00
|
|
|
return postEntries.map((entry) => ({
|
2026-02-18 18:11:29 +01:00
|
|
|
params: { slug: entry.id },
|
2024-08-18 19:06:50 +02:00
|
|
|
props: { entry },
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const { entry } = Astro.props;
|
2026-02-18 18:11:29 +01:00
|
|
|
const { Content } = await render(entry);
|
2024-08-18 19:06:50 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
|
|
<Content />
|