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 projects = await getCollection('projects');
return projects.map(project => ({
params: { id: project.id },
props: { post: project },
}));
}
// 2. For your template, you can get the entry directly from the prop
const { project } = Astro.props;
const { Content } = await render(project);
---
<h1>{project.id}</h1>
<Content />