2026-01-20 02:31:21 +03:00
|
|
|
import { getSortedPostsData } from '@/lib/posts';
|
|
|
|
|
import BlogArea from '@/components/blogpost';
|
2025-03-01 06:33:09 +03:00
|
|
|
|
|
|
|
|
export default function Home() {
|
2026-01-20 02:31:21 +03:00
|
|
|
const blogposts = getSortedPostsData();
|
|
|
|
|
|
|
|
|
|
const formattedPosts = blogposts.map(post => ({
|
|
|
|
|
label: post.title,
|
|
|
|
|
body: post.description,
|
|
|
|
|
publish: new Date(post.date).toLocaleDateString('ru-RU', {
|
|
|
|
|
day: 'numeric',
|
|
|
|
|
month: 'long',
|
|
|
|
|
year: 'numeric',
|
|
|
|
|
}),
|
|
|
|
|
get_absolute_url: `/post/${post.slug}`,
|
|
|
|
|
tags: post.tags,
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
return <BlogArea blogposts={formattedPosts} />;
|
|
|
|
|
}
|