diff --git a/blog/src/layouts/BlogPostLayout.astro b/blog/src/layouts/BlogPostLayout.astro index bae2d93..5df9d7a 100644 --- a/blog/src/layouts/BlogPostLayout.astro +++ b/blog/src/layouts/BlogPostLayout.astro @@ -7,13 +7,14 @@ import { formatLocalizedDateString } from "../lib/formatDate"; import type { PostData } from "../content.config"; interface Props { - frontmatter: PostData; + postData: PostData; } -const { frontmatter } = Astro.props; +const { postData } = Astro.props; + +const titleImg = findImageByPath(postData.image.path); +const localeDate = formatLocalizedDateString(postData.date); -const titleImg = findImageByPath(frontmatter.image.path); -const localeDate = formatLocalizedDateString(frontmatter.date); ---
@@ -21,12 +22,12 @@ const localeDate = formatLocalizedDateString(frontmatter.date); {frontmatter.image.alt} -

{frontmatter.title}

+

{postData.title}

- Autor: {frontmatter.author} + Autor: {postData.author} {localeDate}
diff --git a/blog/src/pages/blog/1_Under_Construction.md b/blog/src/pages/blog/1_Under_Construction.md index 7406ef1..e5cb0cb 100644 --- a/blog/src/pages/blog/1_Under_Construction.md +++ b/blog/src/pages/blog/1_Under_Construction.md @@ -1,5 +1,4 @@ --- -layout: ../../layouts/BlogPostLayout.astro title: Under Construction subtitle: Wir bauen für Sie description: Bald könnt ihr hier unsere ersten Abenteuer mitverfolgen. Und keine Sorge...an der Webseite wird auch noch gearbeitet! diff --git a/blog/src/pages/blog/2_Ostseeurlaub.md b/blog/src/pages/blog/2_Ostseeurlaub.md index f0df8c6..d6bee59 100644 --- a/blog/src/pages/blog/2_Ostseeurlaub.md +++ b/blog/src/pages/blog/2_Ostseeurlaub.md @@ -1,5 +1,4 @@ --- -layout: ../../layouts/BlogPostLayout.astro title: Ostseeurlaub subtitle: Finden wir ein Boot? Suchen wir überhaupt oder faulenzen wir nur? description: Ostseeurlaub bedeutet für mich ganz viele Kindheitserinnerungen. Besonders diese Woche war vollgepackt davon. Hier meine Reiseempfehlung... diff --git a/blog/src/pages/blog/3_Matrei.md b/blog/src/pages/blog/3_Matrei.md index 9ba9fd7..9eaead5 100644 --- a/blog/src/pages/blog/3_Matrei.md +++ b/blog/src/pages/blog/3_Matrei.md @@ -1,5 +1,4 @@ --- -layout: ../../layouts/BlogPostLayout.astro title: Luxusurlaub in den Bergen - Hike & Bike im Wipptal subtitle: Das ist jetzt also unser Leben. Luxushotels, 3-Gänge-Menüs und die schönsten Umgebungen. description: Was könnte ein besser Kontrast zum Zelturlaub an der Ostsee sein, als eine Woche in einem luxuriösen Hotel, mitten in den Alpen? Und wenn ihr jetzt denkt, dass wir unsere Abfindung verschleudern...das ganze hat uns nur 80€ p.P. gekostet ;). Wie das funktioniert erfahrt ihr im Artikel. diff --git a/blog/src/pages/blog/[slug].astro b/blog/src/pages/blog/[slug].astro index 591a794..3f500f4 100644 --- a/blog/src/pages/blog/[slug].astro +++ b/blog/src/pages/blog/[slug].astro @@ -3,7 +3,7 @@ import { getCollection, render } from "astro:content"; import BlogPostLayout from "../../layouts/BlogPostLayout.astro"; export async function getStaticPaths() { - const posts = await getCollection("posts"); + const posts = await getCollection('posts'); return posts.map((post) => ({ params: { @@ -19,6 +19,6 @@ const { post } = Astro.props; const { Content } = await render(post); --- - +