---
import Layout from '../../../layouts/Layout.astro';
import { getCollection } from 'astro:content';
import '../../../styles/markdown.css';

// 1. Generate a new path for every collection entry
export async function getStaticPaths() {
  const blogEntries = await getCollection('dhbw');
  return blogEntries.map(entry => ({
    params: { slug: entry.slug }, props: { entry },
  }));
}
// 2. For your template, you can get the entry directly from the prop
const { entry } = Astro.props;
const { Content } = await entry.render();
---

<Layout title={entry.data.title}>
  <Content />
</Layout>