mirror of
https://github.com/valentineus/popov.link.git
synced 2025-08-14 10:10:25 +03:00
refactor: update blog post date handling and schema
- Replaced `pubDate` with `datePublished` in blog post components for consistency. - Updated sorting logic in blog sections to use `datePublished`. - Enhanced blog post schema to include `dateModified` for better structured data representation. - Adjusted various blog markdown files to reflect the new date fields.
This commit is contained in:
@@ -8,7 +8,9 @@ type Props = {
|
||||
|
||||
const { post } = Astro.props;
|
||||
const { remarkPluginFrontmatter } = await post.render();
|
||||
const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
|
||||
|
||||
const formattedDate = dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY");
|
||||
const datePublished = post.data.datePublished.toISOString();
|
||||
---
|
||||
|
||||
<style lang="scss">
|
||||
@@ -29,7 +31,7 @@ const formattedDate = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY"
|
||||
<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>
|
||||
<time datetime={datePublished} lang="en">{formattedDate}</time>
|
||||
<span>•</span>
|
||||
<span>{remarkPluginFrontmatter.minutesRead}</span>
|
||||
</small>
|
||||
|
Reference in New Issue
Block a user