1
0
Fork 0
mirror of https://github.com/TheTaz25/denis.ergin.git synced 2025-07-12 22:08:48 +00:00

feat(knowledge-base): Build Web-Engineering-I introduction page with links to slides

This commit is contained in:
Denis Ergin 2024-10-18 11:52:19 +02:00
parent d207c35805
commit 8b2bbc4b56
9 changed files with 238 additions and 1 deletions

View file

@ -0,0 +1,20 @@
---
import Layout from '../../../layouts/Layout.astro';
import { getCollection } from 'astro:content';
import '../../../styles/markdown.css';
// 1. Generate a new path for every collection entry
export async function getStaticPaths() {
const blogEntries = await getCollection('dhbw');
return blogEntries.map(entry => ({
params: { slug: entry.slug }, props: { entry },
}));
}
// 2. For your template, you can get the entry directly from the prop
const { entry } = Astro.props;
const { Content } = await entry.render();
---
<Layout title={entry.data.title}>
<Content />
</Layout>