{
  "id": "astro-static-seo-site",
  "type": "context-packs",
  "category": "context",
  "locale": "zh",
  "url": "/zh/context/astro-static-seo-site",
  "title": "Astro 静态 SEO 站点 — 上下文包",
  "description": "一个可复制的上下文包，描述了 Astro 静态 SEO 站点，以便 AI 代理从第一个提示开始就能正确地在其中工作。",
  "tools": [
    "Cursor",
    "Claude Code",
    "Codex"
  ],
  "stack": [
    "Astro",
    "Tailwind",
    "TypeScript"
  ],
  "tags": [
    "astro",
    "seo",
    "context-pack"
  ],
  "difficulty": null,
  "updated": "2026-06-08",
  "markdown": "将此内容粘贴到任务的顶部，以便代理在编写任何内容之前了解项目。它既可供人类阅读，也可供您的代理阅读。\n\n## 项目背景\n\n```txt\nA content-driven static site built with Astro. No database, no server runtime.\nContent lives in Markdown/MDX under src/content and is rendered to static HTML\nat build time. Deployed to Cloudflare Pages.\n```\n\n## 技术栈\n\n```txt\nAstro 6 (static output)\nMDX content collections (Content Layer API)\nTailwind CSS v4 (via @tailwindcss/vite)\nPagefind for static search\nTypeScript (strict)\n```\n\n## 目录结构\n\n```txt\nsrc/content/        # MDX content, one folder per collection\nsrc/content.config.ts\nsrc/layouts/        # BaseLayout, ResourceLayout\nsrc/pages/          # routes + .md/.json endpoints + llms.txt\nsrc/components/\n```\n\n## 编码规范\n\n```txt\n- Content is data: edits to copy should be MDX edits, not template changes.\n- Keep components in plain Astro; add a framework island only when needed.\n- Every resource page also emits a .md and .json version.\n- No client-side rendering of primary content — output HTML at build time.\n```\n\n## AI 任务边界\n\n```txt\n- Do not add a server adapter or database.\n- Do not break the .md/.json/llms.txt endpoints.\n- Validate frontmatter against the zod schema in content.config.ts.\n```\n\n## llms.txt\n\n```txt\nThis site publishes /llms.txt and a .md version of every page so agents can\nread content as clean Markdown instead of scraping HTML.\n```"
}