import { Metadata } from "next"; import { BasePage } from "@/app/base-page"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import Link from "next/link"; import { getPosts } from "@/lib/blog/query"; import { Post, Author } from "@/types/blog"; import { Separator } from "@/components/ui/separator"; export const metadata: Metadata = { title: "Blog - OpenCut", description: "Read the latest news and updates about OpenCut, the free and open-source video editor.", openGraph: { title: "Blog - OpenCut", description: "Read the latest news and updates about OpenCut, the free and open-source video editor.", type: "website", }, }; export default async function BlogPage() { const data = await getPosts(); if (!data || !data.posts) return
No posts yet
; return (
{data.posts.map((post) => (
))}
); } function BlogPostItem({ post }: { post: Post }) { return (

{post.title}

{post.description}

{post.authors && post.authors.length > 0 && ( )}
); } function AuthorList({ authors }: { authors: Author[] }) { return (
{authors.map((author) => (
{author.name.charAt(0).toUpperCase()}
))}
); }