From f90592d8a106bea418cbd3d8bce9c2d86029f93c Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 9 Apr 2026 08:47:37 +0000 Subject: feat: migrated to Astro 6 --- src/components/PostElement.astro | 6 +++--- src/components/Sections/LatestPosts.astro | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components') diff --git a/src/components/PostElement.astro b/src/components/PostElement.astro index 8b4b7c4..051a8ff 100644 --- a/src/components/PostElement.astro +++ b/src/components/PostElement.astro @@ -1,5 +1,5 @@ --- -import { type CollectionEntry } from "astro:content"; +import { type CollectionEntry, render } from "astro:content"; import dayjs from "dayjs"; type Props = { @@ -7,7 +7,7 @@ type Props = { }; const { post } = Astro.props; -const { remarkPluginFrontmatter } = await post.render(); +const { remarkPluginFrontmatter } = await render(post); const formattedDate = dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY"); const datePublished = post.data.datePublished.toISOString(); @@ -28,7 +28,7 @@ const datePublished = post.data.datePublished.toISOString();
  • - {post.data.title} + {post.data.title}
    diff --git a/src/components/Sections/LatestPosts.astro b/src/components/Sections/LatestPosts.astro index e514ff5..5c6afd9 100644 --- a/src/components/Sections/LatestPosts.astro +++ b/src/components/Sections/LatestPosts.astro @@ -27,7 +27,7 @@ const latestPosts = posts.slice(0, 5); { latestPosts.map((post) => (
  • - + {post.data.title} -- cgit v1.2.3