Improved tagging
All checks were successful
Build and Test / determine_version (push) Successful in 6s
Build and Test / test (push) Successful in 2s
Build and Test / build_and_push (push) Successful in 39s

This commit is contained in:
2025-03-08 01:14:48 -08:00
parent 9050faa239
commit 462b08911d
8 changed files with 43 additions and 80 deletions

View File

@@ -1,17 +1,18 @@
---
import { getCollection, render } from 'astro:content';
import {getCollection, render} from 'astro:content';
import BaseLayout from "../../layouts/BaseLayout.astro";
// 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: { project: project },
params: {id: project.id},
props: {project: project},
}));
}
// 2. For your template, you can get the entry directly from the prop
const { project } = Astro.props;
const { Content } = await render(project);
const {project} = Astro.props;
const {Content} = await render(project);
---
<h1>{project.id}</h1>
<Content />
<BaseLayout title={project.id}>
<Content/>
</BaseLayout>