lbry-tech/src/pages/resources/[slug].astro

18 lines
No EOL
494 B
Text

---
import { getCollection } from 'astro:content';
import Markdown from '../../layouts/Markdown.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>