diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/PostElement.astro | 6 | ||||
| -rw-r--r-- | src/components/Sections/LatestPosts.astro | 2 |
2 files changed, 4 insertions, 4 deletions
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(); <li> <article> - <a href={`/blog/${post.slug}`} lang={post.data.lang}>{post.data.title}</a> + <a href={`/blog/${post.id}`} lang={post.data.lang}>{post.data.title}</a> <div> <small> <time datetime={datePublished} lang="en">{formattedDate}</time> 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) => ( <li> - <a href={`/blog/${post.slug}`} lang={post.data.lang}> + <a href={`/blog/${post.id}`} lang={post.data.lang}> {post.data.title} </a> |
