lbry-tech/src/pages/tutorials/[slug].astro
2024-01-10 22:11:33 +01:00

18 lines
No EOL
497 B
Text

---
import { getCollection } from 'astro:content';
import Markdown from '../../layouts/Collections.astro';
export async function getStaticPaths() {
const entries = await getCollection('tutorials');
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>