Hello, Astro Content Collections | AI Blog

Hello, Astro Content Collections

内容架构已就位

这是一篇示例 MDX 文章,用于验证 Content CollectionsZod 校验是否正常工作。当前 Schema 要求:

  • 必填:title, description, pubDate, tags
  • 可选:updatedDate, heroImage
  • draft 默认值为 false

MDX 能力

可以在 Markdown 中编写 JSX/TSX 组件(通过 Astro Islands 按需加载),以及使用 remark/rehype 插件带来的 TOC 与 slug 生成功能。

代码示例

const sum = (a: number, b: number): number => a + b;
# guide# astro