mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-03 16:10:26 +03:00
- Wrapped the post link in an <article> tag for improved semantic structure. - Updated blogSchema to include posts for better structured data representation. - Adjusted the blog index to utilize the new posts parameter for enhanced SEO.
39 lines
790 B
Plaintext
39 lines
790 B
Plaintext
---
|
|
import { type CollectionEntry } from "astro:content";
|
|
import dayjs from "dayjs";
|
|
|
|
type Props = {
|
|
readonly post: CollectionEntry<"blog">;
|
|
};
|
|
|
|
const { post } = Astro.props;
|
|
const { remarkPluginFrontmatter } = await post.render();
|
|
const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
|
|
---
|
|
|
|
<style lang="scss">
|
|
@use "../scss/variables" as *;
|
|
|
|
a {
|
|
color: $colorText;
|
|
}
|
|
|
|
small {
|
|
font-size: $fontSizeBase * 0.75;
|
|
opacity: 0.5;
|
|
}
|
|
</style>
|
|
|
|
<li>
|
|
<article>
|
|
<a href={`/blog/${post.slug}`} lang={post.data.lang}>{post.data.title}</a>
|
|
<div>
|
|
<small>
|
|
<time datetime={post.data.pubDate.toISOString()} lang="en">{formattedDate}</time>
|
|
<span>•</span>
|
|
<span>{remarkPluginFrontmatter.minutesRead}</span>
|
|
</small>
|
|
</div>
|
|
</article>
|
|
</li>
|