任务: 文档 board:左侧导航、正文、面包屑、上一篇/下一篇、可选页内 TOC。本 recipe 只指向 surface 与 component 单元页。
结果
- 通过 docs page surface 提供的文档 board(或 collection)
- Board
_nav.yaml(或等价导航树)驱动左侧栏 - 一篇 doc 对象渲染为正文;树中有邻居时 prev/next 可用
步骤(只链出)
- 先有可运行的 Web Device 站点:实作:第一站。
- 理解
content/docs/下的对象:内容对象、元数据与 locale。 - Board 导航约定:路由、导航与 locale · 路由与 locale 参考。
- 挂载文档壳 —— author entry 与 props 读 surface 单元:
docs-pagesurface。
文档 board 规范单元
| 角色 | 单元页 |
|---|---|
| Board 壳(导航 + 正文 + chrome) | docs-page |
| 页内 TOC(启用时) | in-page-toc |
| 搜索入口(board 暴露搜索时) | search-page |
| 列表/分页辅助(索引) | pagination surface |
| 可选评论挂载 | comments-surface surface — 与 AUP widget comments-surface 不同层 |
文档正文内的结构
Doc 正文是 Markdown。结构与指令用单元页;不要把 layout component 当 MD:
- 结构:heading · paragraph · fenced code · list · thematicBreak
- 指令:
::::steps·:::step·::embed· 卡片见 Markdown hub - document target 上的可移植 AUP(tabs 等):
view·input— 示例合同:Live 示例:范围与合同
分层纪律
| 需求 | 层 | 单元位置 |
|---|---|---|
| 文档 chrome / 左导航 | Web Device surface | /docs/web-device/surfaces/docs-page/ |
| 落地页卡片列表 | Web Device layout component | /docs/web-device/components/... |
| 可移植树节点 | AUP primitive | /docs/aup/primitives/... |
| 仅 Web 的 AUP chrome widget | AUP widget | /docs/aup/widgets/... |
不要在本 recipe 页并排写多个 surface 或 component 的合同正文。
相关
- 非文档集合落地:集合列表页
- AUP 交互演示(不是 docs surface):Showcase 映射