diff options
author | Valentin Popov <valentin@popov.link> | 2025-06-12 02:20:36 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2025-06-12 02:20:36 +0300 |
commit | 67f245a48faf6e89989aca2ea571b657fd4c8888 (patch) | |
tree | 110c7f4f842d30ef1c79d916d40e143d30adec5a /src/components/Sections/LatestPosts.astro | |
parent | 16fa8a3b5de7dd7c4fa763fecbba0063f6b4369b (diff) | |
download | popov.link-67f245a48faf6e89989aca2ea571b657fd4c8888.tar.xz popov.link-67f245a48faf6e89989aca2ea571b657fd4c8888.zip |
feat: integrate schema.org support and enhance component structure
- Added schema.org support by introducing `schema-dts` for structured data in components.
- Updated `Head`, `BaseLayout`, and various page components to accept and utilize schema props for better SEO.
- Created new utility schemas for blog posts and website to standardize structured data implementation.
- Enhanced the `SocialLinks` section by utilizing dedicated icon components for improved maintainability.
- Refactored the `Header` component to improve accessibility and structure.
- Introduced new icons for social links and integrated them into the layout.
Diffstat (limited to 'src/components/Sections/LatestPosts.astro')
-rw-r--r-- | src/components/Sections/LatestPosts.astro | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/components/Sections/LatestPosts.astro b/src/components/Sections/LatestPosts.astro index 070dc46..e91cb4c 100644 --- a/src/components/Sections/LatestPosts.astro +++ b/src/components/Sections/LatestPosts.astro @@ -1,6 +1,7 @@ --- import { getCollection } from "astro:content"; import dayjs from "dayjs"; +import RSSIcon from "../Icons/RSS.astro"; const posts = await getCollection("blog", ({ data }) => { return data.draft !== true; @@ -21,7 +22,7 @@ const latestPosts = posts.slice(0, 5); </style> <section> - <h2>Latest posts</h2> + <h2>Latest posts <RSSIcon /></h2> <ul> { latestPosts.map((post) => ( @@ -29,7 +30,12 @@ const latestPosts = posts.slice(0, 5); <a href={`/blog/${post.slug}`} lang={post.data.lang}> {post.data.title} </a> - <small>{dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY")}</small> + + <small> + <time datetime={post.data.pubDate.toISOString()} lang="en"> + {dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY")} + </time> + </small> </li> )) } |