--- import { getDescription, fmtTime } from "../../utils/index"; import { type CollectionEntry, getCollection } from "astro:content"; import { render } from "astro:content"; export async function getStaticPaths() { const posts = await getCollection("blog"); return posts.map((post: any) => ({ params: { article: post.data.id }, props: post })); } // 处理文章内容 type Props = CollectionEntry<"blog">; const post: any = Astro.props; // 页面 Info import SITE_CONFIG from "../../config"; // 处理文章内容 const description = getDescription(post); const { Content } = await render(post); // 公共 Layout import Layout from "../../layouts/Layout.astro"; // Aside组件 import Aside from "../../components/Aside.astro"; // Footer 组件 import Copyright from "../../components/Copyright.astro"; // 评论组件 import Comment from "../../components/Comment.astro"; // 文章页面样式 import "../../styles/Article.less"; ---

{post.data.title}