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:
parent
d207c35805
commit
8b2bbc4b56
9 changed files with 238 additions and 1 deletions
20
src/pages/knowledge-base/dhbw/[...slug].astro
Normal file
20
src/pages/knowledge-base/dhbw/[...slug].astro
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue