20 lines
515 B
Text
20 lines
515 B
Text
---
|
|
import GuideLayout from "@layouts/GuideLayout.astro";
|
|
|
|
import { getCollection, render } from "astro:content";
|
|
|
|
export async function getStaticPaths() {
|
|
const guidePages = await getCollection("guide");
|
|
|
|
return guidePages.map(page => ({
|
|
params: { id: page.id == "index" ? "/" : page.id },
|
|
props: { page },
|
|
}));
|
|
}
|
|
|
|
const { page } = Astro.props;
|
|
const { Content, headings } = await render(page);
|
|
---
|
|
<GuideLayout title={page.data.title} description="" headings={headings}>
|
|
<Content/>
|
|
</GuideLayout>
|