跳到主要内容

Sample 合同 · MD 结构 · ARC 2.0.0-beta.28

GFM admonition

在内容 Markdown 中放置 GitHub 风格 callout,并在同一页查看真实 document 渲染。

Web Device Markdown 结构——不是 AUP primitive;不是 theme/site layout 组件。

Sample 合同

字段值
目的在内容 Markdown 中编写静态 GFM admonition callout
边界不可编辑;不是完整 AUP text props;无写入路径
作者入口content.md 中的 > [!NOTE] 风格 blockquote
表面Web Device document(静态)
公共状态released
Fallback / 失败未知 marker → 普通引用;裸 marker 使用 locale 默认标题
验证下方路由 · arc --version = 2.0.0-beta.28

用途

来自 > [!NOTE](以及 TIP/IMPORTANT/WARNING/CAUTION)blockquote 的 GitHub 风格 callout。

Sample

源码(标记行自定义标题):

markdown
> [!IMPORTANT] This is a content-file capability
> Write this kind of callout in `content.md`. The page presents what the author wrote; it does not execute an action or modify data.

渲染:

This is a content-file capability

Write this kind of callout in content.md. The page presents what the author wrote; it does not execute an action or modify data.

裸 marker(同行无标题)使用内容 locale 的默认标签。英文保持英文默认;zh 在读取时应用:

Markerzh 默认标题
NOTE说明
TIP提示
IMPORTANT重要
WARNING警告
CAUTION注意

源码(裸 marker):

markdown
> [!TIP]
> Prefer a same-line custom title when the English word is not the label you want.

渲染:

提示

Prefer a same-line custom title when the English word is not the label you want.

失败与限制

情形预期结果
[!FIXME] 或其他未知 marker普通 blockquote,不是 callout chrome
marker 不在引用首行不识别为 admonition
期望编辑或关闭控件仅静态文档内容

验证证据

项值
基线2026-08-09 · arc --version → 2.0.0-beta.28
能力行docs/aup/capability-matrix.md §6 · GFM admonition
实现content-reader.ts(ADMONITION_MARKER_RE、ADMONITION_LOCALIZED_LABELS);text admonition renderer
公开路由/en/docs/web-device/markdown/gfm-admonition/ · /zh/docs/web-device/markdown/gfm-admonition/
本地运行arc service start --blocklet blocklets/arcblock --port 4900 · 打开路由;zh locale 下裸 marker 显示中文默认标题
接受标准源码与渲染 callout 一致;未知 marker 保持引用;无编辑控件

相关