mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-04 00:20:26 +03:00
feat: enhance accessibility and language support across components
- Updated various components to include `lang` attributes for improved accessibility and SEO. - Introduced a new `env.d.ts` file to define environment variables for better type safety. - Adjusted the print width in `.prettierrc.mjs` for improved code formatting. - Streamlined the `Header`, `PostElement`, and `SocialLinks` components for better structure and clarity. - Added language support to blog posts and updated the layout to reflect these changes.
This commit is contained in:
@ -24,6 +24,7 @@ const { Content, remarkPluginFrontmatter } = await post.render();
|
||||
const date = dayjs(post.data.pubDate.toString()).format("MMMM DD, YYYY");
|
||||
const title = `${post.data.title} | Valentin Popov`;
|
||||
const description = post.data.description;
|
||||
const lang = post.data.lang;
|
||||
---
|
||||
|
||||
<style lang="scss">
|
||||
@ -34,7 +35,7 @@ const description = post.data.description;
|
||||
}
|
||||
</style>
|
||||
|
||||
<Layout title={title} description={description}>
|
||||
<Layout title={title} description={description} lang={lang}>
|
||||
<article>
|
||||
<section>
|
||||
<h1>{post.data.title}</h1>
|
||||
@ -44,7 +45,7 @@ const description = post.data.description;
|
||||
<p>
|
||||
<small>
|
||||
Posted
|
||||
<time datetime={post.data.pubDate.toISOString()}>{date}</time>
|
||||
<time datetime={post.data.pubDate.toISOString()} lang="en">{date}</time>
|
||||
by {post.data.author}
|
||||
<span> • </span>
|
||||
<span>{remarkPluginFrontmatter.minutesRead}</span>
|
||||
|
Reference in New Issue
Block a user