diff --git a/src/pages/haiku/[...slug].astro b/src/pages/haiku/[...slug].astro new file mode 100644 index 0000000..5426708 --- /dev/null +++ b/src/pages/haiku/[...slug].astro @@ -0,0 +1,21 @@ +--- +import { getCollection } from 'astro:content'; + +import BaseLayout from '../../layouts/BaseLayout.astro'; +import { Verse } from '../../components'; + +export async function getStaticPaths() { + const haikuEntries = await getCollection('haiku'); + return haikuEntries.map((entry) => ({ + params: { slug: entry.slug }, + props: { entry }, + })); +} + +const { entry } = Astro.props; +--- + + + {entry.data.de} + {entry.data.en} +