{
  "$schema": "https://pingfanfan.github.io/OpenWebsite/schema/knowledge-page.schema.json",
  "format": "knowledge-page",
  "id": "page-template",
  "url": "https://pingfanfan.github.io/OpenWebsite/docs/page-template/",
  "rawUrl": "https://pingfanfan.github.io/OpenWebsite/raw/page-template.md",
  "apiUrl": "https://pingfanfan.github.io/OpenWebsite/api/pages/page-template.json",
  "schemaUrl": "https://pingfanfan.github.io/OpenWebsite/schema/knowledge-page.schema.json",
  "title": "页面模板",
  "summary": "定义 HTML 骨架、元数据块、section contract 和分发链接。",
  "lastUpdated": "2026-03-12",
  "version": "v1.0.0",
  "audience": ["ai-agent", "crawler", "developer", "human"],
  "sourceOfTruth": "主题页结构合同",
  "tags": ["html", "template", "metadata", "sections"],
  "sections": [
    {
      "id": "required-blocks",
      "title": "必备区块",
      "summary": "主题页必须同时满足导航发现、事实表达和机器提取三种需求。",
      "content": [
        "页面必须提供标题和一句话摘要，先给结论再给细节。",
        "页面必须提供机器元数据块，声明 page id、日期、版本和原始格式入口。",
        "正文 section 和相关页面区块应显式存在。"
      ]
    },
    {
      "id": "html-skeleton",
      "title": "推荐 HTML 骨架",
      "summary": "模板的重点是 predictability，而不是极简。",
      "content": [
        "body 标签可通过 data-page-id、data-raw-url 和 data-api-url 暴露页面身份。",
        "header 负责稳定导航，article 负责正文，aside 负责元数据。",
        "主题页应显式呈现 docs、raw 和 api 三个入口。"
      ]
    },
    {
      "id": "section-contract",
      "title": "Section Contract",
      "summary": "每个 section 都应足够独立，使其被单独抓取时仍然完整。",
      "content": [
        "一级 section 先写摘要句，说明这一节回答什么。",
        "正文使用短段落和完整句列表，减少跨段依赖。",
        "示例、表格和代码块都应附前导说明。"
      ]
    },
    {
      "id": "distribution-links",
      "title": "分发链接",
      "summary": "AI 系统经常需要从 HTML 跳到原文或结构化数据。",
      "content": [
        "在 head 中声明指向 Markdown 和 JSON 的 alternate links。",
        "在正文侧栏中再次公开 docs、raw 和 api URL。",
        "schema 驱动内容应额外公开 schema 文件链接。"
      ]
    }
  ],
  "relatedPages": [
    {
      "id": "json-schema",
      "title": "JSON Schema",
      "url": "https://pingfanfan.github.io/OpenWebsite/docs/json-schema/"
    },
    {
      "id": "retrieval-contract",
      "title": "检索与抓取契约",
      "url": "https://pingfanfan.github.io/OpenWebsite/docs/retrieval-contract/"
    }
  ]
}
