From 933d6874b1fe1dbb113e9de39425f2d713a72408 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Wed, 22 Apr 2026 17:53:21 +0000 Subject: feat: enhance blog and SEO features with new plugins and metadata - Introduced rehypeLazyImages plugin for lazy loading images in blog posts. - Updated sitemap integration to include last modified dates for blog posts. - Enhanced Head and BaseLayout components to support additional Open Graph metadata. - Improved RSS feed generation with sanitized content and author information. - Updated manifest.json for a darker theme and standalone display mode. - Added support for language-specific attributes in various components. - Refactored blog post handling to include modified and published timestamps. --- src/pages/blog/[...slug].astro | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/pages/blog') diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro index 5ba6b3b..907f64e 100644 --- a/src/pages/blog/[...slug].astro +++ b/src/pages/blog/[...slug].astro @@ -1,9 +1,9 @@ --- import { type CollectionEntry, getCollection, render } from "astro:content"; +import dayjs from "dayjs"; import blogPostSchema from "../../utils/schemas/blogPostSchema"; import breadcrumbSchema from "../../utils/schemas/breadcrumbSchema"; import Comments from "../../components/Comments.astro"; -import dayjs from "dayjs"; import Layout from "../../layouts/BaseLayout.astro"; import personSchema from "../../utils/schemas/personSchema"; import websiteSchema from "../../utils/schemas/websiteSchema"; @@ -31,9 +31,10 @@ const isBasedOn = post.data.basedOn; const lang = post.data.lang; const preview = `/images/preview/${post.id}.png`; const slug = post.id; -const title = post.data.title; +const headline = post.data.title; +const title = `${post.data.title} | Valentin Popov`; -const dateModified = post.data.dateModified?.toISOString(); +const dateModified = (post.data.dateModified ?? post.data.datePublished).toISOString(); const datePublished = post.data.datePublished.toISOString(); const formattedDate = dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY"); @@ -51,14 +52,14 @@ const schema = [ lang, preview, slug, - title, + title: headline, }), breadcrumbSchema({ siteUrl, items: [ { name: "Home", url: "/" }, { name: "Blog", url: "/blog/" }, - { name: title, url: `/blog/${slug}` }, + { name: headline, url: `/blog/${slug}` }, ], }), ]; @@ -72,10 +73,10 @@ const schema = [ } - +
-

{title}

+

{headline}

-- cgit v1.2.3