--- import type { Post } from '@globalInterfaces'; interface Props { posts: Post[]; } const { posts } = Astro.props; function formatDate(date: string): string { if (!date) return ''; return new Date(date).toLocaleString('ru-RU', { year: 'numeric', month: 'long', day: 'numeric', }); } --- { posts.map((post) => { const postLink = `/blog/${post.slug}`; const formattedDate = formatDate(post.publishDate); const displayTitle = post.title.replace('{year}', new Date().getFullYear().toString()); return (
{post.description}