A blog - list

April 1, 2025

准备

  • code

首页

  • 获取目录
const BlogPage = () => { import { getAllPosts } from '@/lib/reader' const allPosts = getAllPosts() return ( ... ) }
  • 渲染目录
const BlogPage = () => { import { getAllPosts } from '@/lib/reader' const allPosts = getAllPosts() return <>{ allPosts.map(post => ( ... )) }</> }

注意:这里的样式没有给出,可以按照自己想要的设计

Tailwind CSS

样式可以使用TailwindCSS

References