Playing around with options for base structure and navigation

This commit is contained in:
2025-07-03 23:50:20 -07:00
parent 65e05066ea
commit d515e581b5
26 changed files with 1075 additions and 398 deletions

View File

@@ -1,18 +0,0 @@
---
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 experiences = await getCollection('experiences');
return experiences.map(experience => ({
params: {id: experience.id},
props: {experience: experience},
}));
}
// 2. For your template, you can get the entry directly from the prop
const {experience} = Astro.props;
const {Content} = await render(experience);
---
<BaseLayout title={experience.id}>
<Content/>
</BaseLayout>

View File

@@ -0,0 +1,6 @@
---
import BaseLayout from '../../layouts/BaseLayout.astro';
---
<BaseLayout>
</BaseLayout>

View File

@@ -0,0 +1,6 @@
---
import BaseLayout from '../../layouts/BaseLayout.astro';
---
<BaseLayout>
</BaseLayout>