jg-eucs/src/pages/[lang]/index.astro
2023-09-11 08:07:19 +02:00

16 lines
590 B
Text

---
import Layout from "../../layouts/index.astro"
import { getCollection, getEntry } from "astro:content"
export function getStaticPaths() {
return [{ params: { lang: "de" } }, { params: { lang: "en" } }]
}
const sections = await getCollection("sections", (section) => /^de/.test(section.id))
// const { data } = await getEntry("pages", "de")
const data = { lang: "de", title: "Einführung EUCs", CSS: "EUC Überblick" }
const warst = sections.map(async (section) => (await section.render()).Content)
---
<Layout lang={data.lang} title={data.title} CSS={data.CSS}>
{warst}
</Layout>