diff options
| author | Valentin Popov <valentin@popov.link> | 2026-04-09 11:47:37 +0300 |
|---|---|---|
| committer | Valentin Popov <valentin@popov.link> | 2026-04-09 11:47:37 +0300 |
| commit | f90592d8a106bea418cbd3d8bce9c2d86029f93c (patch) | |
| tree | b5e4bc36e8b318641d34fd299911babf87b7e5d1 /src/components/PostElement.astro | |
| parent | 12aa763b05e0d5d903e77022afafc6d4bfccad9e (diff) | |
| download | popov.link-f90592d8a106bea418cbd3d8bce9c2d86029f93c.tar.xz popov.link-f90592d8a106bea418cbd3d8bce9c2d86029f93c.zip | |
feat: migrated to Astro 6
Diffstat (limited to 'src/components/PostElement.astro')
| -rw-r--r-- | src/components/PostElement.astro | 6 |
1 files changed, 3 insertions, 3 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> |
