import { Metadata } from 'next' import Link from 'next/link' import { getAllPosts } from '@/lib/markdown' import { formatDate } from '@/lib/utils' export const metadata: Metadata = { title: 'Blog', description: 'Toate articolele din blog', } function PostCard({ post }: { post: any }) { return (
{post.frontmatter.image && (
{post.frontmatter.title}
)}
{post.readingTime} min citire {post.frontmatter.author}

{post.frontmatter.title}

{post.frontmatter.description}

{post.frontmatter.tags && post.frontmatter.tags.length > 0 && (
{post.frontmatter.tags.map((tag: string) => ( #{tag} ))}
)} Citește articolul complet
) } function BlogFilters({ totalPosts }: { totalPosts: number }) { return (

Articole Blog

{totalPosts} {totalPosts === 1 ? 'articol' : 'articole'} publicate

) } export default async function BlogPage() { const posts = await getAllPosts() if (posts.length === 0) { return (

Blog

Nu există articole publicate încă.

Înapoi la pagina principală
) } return (
{posts.map((post) => ( ))}
) }