{entry.title}
{entry.description && ({entry.description}
)} {entry.author && (by {entry.author}
)}import Image from 'next/image' import Link from 'next/link' import { blog } from '@/lib/source' import type { Metadata } from 'next' export const metadata: Metadata = { title: 'Blog', description: 'Latest news and guides from the LibreChat team.', } interface FeedEntry { title: string description?: string date: string dateFormatted: string url: string author?: string ogImage?: string ogImagePosition?: string } const dateFormatter = new Intl.DateTimeFormat('en-US', { year: 'numeric', month: 'long', day: 'numeric', timeZone: 'UTC', }) function getSlug(path: string): string { return path.replace(/\.mdx?$/, '') } export default function BlogPage() { const entries: FeedEntry[] = [] for (const post of blog) { const iso = typeof post.date === 'string' ? post.date : new Date(post.date).toISOString().split('T')[0] entries.push({ title: post.title, description: post.description, date: iso, dateFormatted: dateFormatter.format(new Date(iso + 'T00:00:00Z')), url: `/blog/${getSlug(post._file.path)}`, author: (post as any).author, ogImage: post.ogImage, ogImagePosition: (post as any).ogImagePosition, }) } entries.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()) return (
Latest news and guides from the LibreChat team.
{entry.description}
)} {entry.author && (by {entry.author}
)}