From 0d72c0850c1f6eb104b78d8280327da7a1f1a644 Mon Sep 17 00:00:00 2001 From: Denis Ergin Date: Fri, 20 Jun 2025 19:08:01 +0200 Subject: [PATCH] chore: apply last content changes for astro 5 --- src/pages/knowledge-base/dhbw/[...slug].astro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/knowledge-base/dhbw/[...slug].astro b/src/pages/knowledge-base/dhbw/[...slug].astro index 7d450d8..a854b2c 100644 --- a/src/pages/knowledge-base/dhbw/[...slug].astro +++ b/src/pages/knowledge-base/dhbw/[...slug].astro @@ -1,18 +1,18 @@ --- import Layout from '../../../layouts/Layout.astro'; -import { getCollection } from 'astro:content'; +import { getCollection, render } 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 }, + params: { slug: entry.id }, props: { entry }, })) } // 2. For your template, you can get the entry directly from the prop const { entry } = Astro.props; -const { Content } = await entry.render(); +const { Content } = await render(entry); ---