# 页面模板

Summary: 页面模板必须足够一致，使 AI 和工具可以用固定规则提取内容，而不是每页重新猜结构。

Last updated: 2026-03-12  
Version: v1.0.0  
Docs URL: https://pingfanfan.github.io/OpenWebsite/docs/page-template/  
API URL: https://pingfanfan.github.io/OpenWebsite/api/pages/page-template.json

## 必备区块

- 标题和一句话摘要
- 机器元数据块
- 带稳定 id 的正文 sections
- 相关页面或来源区块

## 推荐 HTML 骨架

```html
<body data-page-id="page-template"
      data-raw-url="/raw/page-template.md"
      data-api-url="/api/pages/page-template.json">
  <header>...</header>
  <main>
    <article>
      <h1>页面标题</h1>
      <p>一句话摘要</p>
      <section id="required-blocks">...</section>
    </article>
    <aside>页面元数据</aside>
  </main>
</body>
```

## Section Contract

- 一级 section 先给摘要句。
- 正文使用短段落和完整句列表。
- 示例和表格要附前导说明。
- section id 必须唯一且稳定。

## 分发链接

- 在 `<head>` 中声明 Markdown 和 JSON alternate links。
- 在页面侧栏显式提供 docs/raw/api URL。
- schema 驱动内容应额外提供 schema 文件链接。
