From 7f1a146da7bd8e01cfff7d728edc5526d371c419 Mon Sep 17 00:00:00 2001 From: Web-serfer Date: Thu, 7 May 2026 21:24:04 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=BE=D0=B2=D1=8B=D0=B9=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layouts/ArticleLayout.astro | 13 +++++++++++++ frontend/src/pages/blog/[slug].astro | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/frontend/src/layouts/ArticleLayout.astro b/frontend/src/layouts/ArticleLayout.astro index 1702db1..6f967ac 100644 --- a/frontend/src/layouts/ArticleLayout.astro +++ b/frontend/src/layouts/ArticleLayout.astro @@ -22,6 +22,7 @@ export interface Props { categoryColor?: string; postTitle: string; date: string; + dateIso?: string; author: string; readTime: string; readmeTime: string; @@ -43,6 +44,7 @@ const { categoryColor = 'bg-gold', postTitle, date, + dateIso, author, readTime, readmeTime, @@ -65,6 +67,17 @@ const { {canonicalLink && } + + + + + + + + + + + diff --git a/frontend/src/pages/blog/[slug].astro b/frontend/src/pages/blog/[slug].astro index 221fd27..67cf676 100644 --- a/frontend/src/pages/blog/[slug].astro +++ b/frontend/src/pages/blog/[slug].astro @@ -89,6 +89,10 @@ const formatDate = (date: string) => { return `${day}/${month}/${year}`; }; +const formatDateIso = (date: string) => { + return new Date(date).toISOString(); +}; + // Для related posts берем те же категории const { posts: relatedPosts } = await getPosts({ perPage: 4, category: post.category }); const filteredRelated = relatedPosts.filter(p => p.slug !== slug).slice(0, 3); @@ -112,6 +116,7 @@ const heroImage = getPostImageUrl(post); categoryColor={post.categoryColor} postTitle={post.title} date={formatDate(post.date)} + dateIso={formatDateIso(post.date)} author={post.author} readTime={post.readTime} readmeTime={post.readmeTime}