---
import { getCollection } from 'astro:content';
import Markdown from '../../layouts/Collections.astro';

export async function getStaticPaths() {
  const entries = await getCollection('resources');
  return entries.map(entry => ({
    params: { slug: entry.slug }, props: { entry },
  }));
}

const { entry } = Astro.props;
const { Content, headings } = await entry.render();
---

<Markdown frontmatter={entry.data} headings={headings} collection={entry.collection}>
    <Content />
</Markdown>