import Link from 'next/link'; import type { Metadata } from 'next'; import { notFound } from 'next/navigation'; import { ArrowRight } from 'lucide-react'; import { blogSource, formatBlogDate, sortBlogPages } from '@/lib/blog'; import { isLanguage, type Language } from '@/lib/i18n'; const copy: Record = { zh: { title: '开发者博客', description: 'Cursor Byok 的架构决策、协议实现与开发进展。', intro: '记录 Cursor Byok 的架构决策、协议实现和开发进展。', }, en: { title: 'Developer Blog', description: 'Architecture decisions, protocol work, and development progress of Cursor Byok.', intro: 'Notes on architecture decisions, protocol work, and development progress of Cursor Byok.', }, }; export async function generateMetadata(props: PageProps<'/[lang]/blog'>): Promise { const { lang } = await props.params; if (!isLanguage(lang)) notFound(); return { title: copy[lang].title, description: copy[lang].description, }; } export default async function BlogPage(props: PageProps<'/[lang]/blog'>) { const { lang } = await props.params; if (!isLanguage(lang)) notFound(); const t = copy[lang]; const posts = sortBlogPages(blogSource.getPages(lang)); return (

DEVELOPER BLOG

{t.title}

{t.intro}

{posts.map((post) => (

{post.data.title}

{post.data.description}

))}
); }