Example e2e
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2025-03-07 22:23:32 -08:00
parent e5102000b4
commit fbc3d035d8
18 changed files with 5461 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
---
import { getCollection, render } from 'astro:content';
// 1. Generate a new path for every collection entry
export async function getStaticPaths() {
const hobbies = await getCollection('hobbies');
return hobbies.map(hobby => ({
params: { id: hobby.id },
props: { post: hobby },
}));
}
// 2. For your template, you can get the entry directly from the prop
const { hobby } = Astro.props;
const { Content } = await render(hobby);
---
<h1>{hobby.id}</h1>
<Content />