import Link from 'next/link' import PostCard from '@/components/blog/PostCard' import { getAllPosts } from '@/app/blog/utils' export const metadata = { title: 'Blog', description: 'Read my blog.', } export default async function Page() { const posts = await getAllPosts() const hasRepo = Boolean(process.env.BLOG_REPO) const repo = process.env.BLOG_REPO const repoPath = process.env.BLOG_PATH || '' const repoBranch = process.env.BLOG_BRANCH || 'main' const sourceLabel = hasRepo ? `Local MDX + GitHub (${repo}${repoPath ? `/${repoPath}` : ''}@${repoBranch})` : 'Local MDX' return (
Back home

My Blog

Content source: {sourceLabel}
{posts.map((post) => ( ))}
) }