da-content
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDA + EDS content reference
DA + EDS 内容参考
A reference skill — not a workflow. Use it whenever you need to know what
the rules are for generating, uploading, or delivering content through
Adobe Document Authoring (DA) and Edge Delivery Services (EDS).
This skill consolidates rules from three primary surfaces. Load the
reference for the task at hand:
| Doing | Read |
|---|---|
| Generating HTML for DA upload | references/html-content.md |
| Uploading images, video, PDFs, fonts | references/media.md |
| Hitting the DA admin API, auth, preview/publish | references/platform.md |
| Re-verifying asset boundary behavior empirically | references/fixtures/README.md |
Every factual claim in the references is tagged (read from
code or observed empirically) or (inferred from documentation
without direct verification).
[verified][assumed]这是一份参考技能,而非工作流。当你需要了解通过Adobe Document Authoring(DA)和Edge Delivery Services(EDS)生成、上传或交付内容的规则时,即可使用本技能。
本技能整合了三个核心层面的规则。根据手头任务加载对应的参考文档:
| 操作 | 参考文档 |
|---|---|
| 生成用于DA上传的HTML | references/html-content.md |
| 上传图片、视频、PDF、字体 | references/media.md |
| 调用DA admin API、认证、预览/发布 | references/platform.md |
| 实证验证资源边界行为 | references/fixtures/README.md |
参考文档中的所有事实声明都标记为(从代码读取或实证观察)或(从文档推断,未直接验证)。
[verified][assumed]When to use this skill
何时使用本技能
Invoke this skill whenever you are:
- Generating HTML that will be uploaded to DA ().
admin.da.live/source/... - Uploading any binary (PNG, JPG, SVG, MP4, PDF, WOFF2) to DA.
- Calling (Source API) or
admin.da.live(preview / publish API) directly.admin.hlx.page - Reading a DA-stored HTML document and modifying it before re-upload.
- Diagnosing why a generated page renders incorrectly on /
aem.page(silent failures:aem.liveimages, missing meta tags, blocks rendering as plain HTML without their JS or CSS).about:error
在以下场景中调用本技能:
- 生成将上传至DA的HTML()。
admin.da.live/source/... - 向DA上传任何二进制文件(PNG、JPG、SVG、MP4、PDF、WOFF2)。
- 直接调用(Source API)或
admin.da.live(预览/发布API)。admin.hlx.page - 读取DA存储的HTML文档并修改后重新上传。
- 诊断生成的页面为何在/
aem.page上渲染异常(静默失败:aem.live图片、缺失元标签、区块以纯HTML形式渲染而无对应的JS或CSS)。about:error
When NOT to use this skill
何时不使用本技能
- Writing block JS or CSS for a project — use building-blocks. This skill covers the content side, not the code side.
- Universal Editor, structured-content authoring, or AEM Cloud Service (Java / OSGi / JCR). Out of scope.
- 为项目编写区块JS或CSS —— 使用building-blocks技能。本技能涵盖的是内容层面,而非代码层面。
- Universal Editor、结构化内容创作或AEM Cloud Service(Java/OSGi/JCR)。这些均超出本技能范围。
Related Skills
相关技能
- da-auth — Obtain the IMS token needed for every and
admin.da.livecall. Invoke before any operation in this skill that needsadmin.hlx.page.DA_TOKEN - generate-import-html — Generates DA-compliant HTML for imported pages; this skill is the rule reference for what that HTML must look like.
- page-import — Orchestrates full page imports into canonical EDS block format. Reads this skill for the DA-side rules.
- snowflake — Static-to-EDS overlay conversion. Loads this skill alongside its own methodology for DA HTML and admin API rules.
- da-auth —— 获取每次调用和
admin.da.live所需的IMS令牌。在本技能中任何需要admin.hlx.page的操作前调用。DA_TOKEN - generate-import-html —— 生成符合DA规范的导入页面HTML;本技能是该HTML格式规则的参考依据。
- page-import —— 协调将完整页面导入标准EDS区块格式。读取本技能中的DA端规则。
- snowflake —— 静态内容到EDS覆盖层的转换。结合自身方法,加载本技能中的DA HTML和admin API规则。
Minimal upload example
最小上传示例
The most common operation — upload an HTML document to DA. Shows the
non-obvious rules in one place: multipart/form-data body, field name
, blob with type, Bearer IMS token, then a separate
preview call to make the page reachable at . See
references/platform.md for the full contract
and references/html-content.md for what
the HTML payload must look like.
datatext/htmlaem.pagebash
undefined最常见的操作 —— 向DA上传HTML文档。将非显而易见的规则集中展示:multipart/form-data请求体、字段名、类型的二进制数据、Bearer IMS令牌,然后单独调用预览接口使页面可在访问。完整协议请见references/platform.md,HTML负载格式要求请见references/html-content.md。
datatext/htmlaem.pagebash
undefinedUse $DA_TOKEN from the da-auth skill, or read a cached token file directly.
使用da-auth技能获取的$DA_TOKEN,或直接读取缓存的令牌文件。
See platform.md §3 for the cache locations the various Adobe DA tools use.
请见platform.md第3节了解各类Adobe DA工具使用的缓存位置。
TOKEN="${DA_TOKEN:?invoke the da-auth skill to obtain a DA admin token}"
TOKEN="${DA_TOKEN:?invoke the da-auth skill to obtain a DA admin token}"
1. Upload HTML — note multipart with field name "data" (other names silently fail)
1. 上传HTML —— 注意使用multipart格式且字段名为"data"(其他字段名将静默失败)
curl -X PUT
-H "Authorization: Bearer $TOKEN"
-F "data=@./page.html;type=text/html"
"https://admin.da.live/source/{org}/{repo}/path/to/page.html"
-H "Authorization: Bearer $TOKEN"
-F "data=@./page.html;type=text/html"
"https://admin.da.live/source/{org}/{repo}/path/to/page.html"
curl -X PUT
-H "Authorization: Bearer $TOKEN"
-F "data=@./page.html;type=text/html"
"https://admin.da.live/source/{org}/{repo}/path/to/page.html"
-H "Authorization: Bearer $TOKEN"
-F "data=@./page.html;type=text/html"
"https://admin.da.live/source/{org}/{repo}/path/to/page.html"
2. Trigger preview — required separate step, path WITHOUT .html extension
2. 触发预览 —— 这是必需的单独步骤,路径不包含.html扩展名
curl -X POST
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/preview/{org}/{repo}/main/path/to/page"
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/preview/{org}/{repo}/main/path/to/page"
curl -X POST
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/preview/{org}/{repo}/main/path/to/page"
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/preview/{org}/{repo}/main/path/to/page"
3. Optional: publish to aem.live
3. 可选:发布至aem.live
curl -X POST
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/live/{org}/{repo}/main/path/to/page"
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/live/{org}/{repo}/main/path/to/page"
Image binaries upload the same way (PUT to `admin.da.live/source/...`)
but do NOT need their own preview/publish call — they're served
directly from `content.da.live` once uploaded. They DO get pulled into
Media Bus (content-addressed, with responsive variants) when a
*document* that references them is previewed — see
[references/media.md §2](./references/media.md) for the asset lifecycle.curl -X POST
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/live/{org}/{repo}/main/path/to/page"
-H "Authorization: Bearer $TOKEN"
"https://admin.hlx.page/live/{org}/{repo}/main/path/to/page"
图片二进制文件的上传方式相同(PUT至`admin.da.live/source/...`),但无需单独调用预览/发布接口 —— 上传后直接从`content.da.live`提供服务。当引用它们的*文档*被预览时,图片会被拉入Media Bus(基于内容寻址,包含响应式变体)—— 请见[references/media.md第2节](./references/media.md)了解资源生命周期。The 11 silent-failure rules
11条静默失败规则
These rules, if violated, produce broken content without any error from DA,
the pipeline, or the renderer. Memorize them; verify them in generated
output before upload.
-
DA HTML is a body fragment. No, no
<!DOCTYPE>, no<html>, no<head>, no<script>, no inline<style>attributes. The pipeline injects head/scripts/styles from Code Bus at delivery. → html-content.md §1style= -
Block class encodes block identity (canonical div form). The outermostcarries
<div>. The first class token is the block name and resolves toclass="<block-name> [<variant>…]". For the accepted table-form alternate, the header is/blocks/<name>/<name>.{js,css}where<tr><td colspan="N">Name</td></tr>matches the cell count of the widest content row; single-column blocks may omitN. Misshapen blocks (missing div class, multi-column table missingcolspan, empty header cell) render as plain HTML without block JS or CSS. → html-content.md §3colspan -
Block names use alphanumeric + single hyphens only. No underscores, no double dashes, no digit-first names. Variants in div form: extra class tokens after the name (). Variants in table form: parentheses after the name (
class="hero cta center"). Both normalize identically viaHero (cta, center). → html-content.md §3toBlockCSSClassNames -
Page Metadata block name is exactly. Div form:
metadata(single lowercase token). Table form: header textclass="metadata"(case-insensitive). Misspellings on either side are silently ignored — noMetadatatags emitted. → html-content.md §5<meta> -
URLs must be reachable from EDS preview infrastructure. The preview step fetches every
<img src>and<img src>URL, content-hashes the bytes, and stores them in Media Bus — that's how the delivered page gets responsive<source srcset>variants. Any URL that doesn't return image bytes (DNS failure, 4xx/5xx, HTML response, timeout > 5s) produces<picture>. Host-less paths (repo-relative<img src="about:error">, document-relative/path/foo.png) also fail because the ingester has nothing to fetch. External URLs work fine and are sideloaded on first preview. → media.md §2, html-content.md §9./foo.png -
Pre-upload binaries only when you need URL stability. Sideloading means you do NOT need to upload an image to DA before referencing it from your HTML — any reachable URL works. Pre-upload (to) when you want the binary under DA's control: immune to third-party host changes, addressable by a stable
/media/<scope>/<file>URL, and re-fetched into Media Bus on each preview. → media.md §2.5, media.md §13.2content.da.live -
DA Source API requireswith field name
multipart/form-data. Other field names (data,file) return 200 OK with no file written. → platform.md §2image -
SVG hard cap is 40 KB. PNG/JPG/AVIF/WEBP cap is 20 MB. MP4 cap is 36 MB. Over-cap SVGs cause the preview POST to fail with("Images N have failed validation"); pre-check sizes before upload. → media.md §6.1
409 AEM_BACKEND_FETCH_FAILED -
Preview / publish is a required separate step. Uploading to DA does NOT make the document visible at/
aem.page. POST toaem.livethenadmin.hlx.page/preview/...after upload. → platform.md §6/live/... -
IMS tokens expire silently with 401 + empty body. Dev tokens last 24 hours. Always pre-flight expiry againstin the cached token file (
expires_atfor da-auth,~/.aem/da-token.jsonfor.hlx/.da-token.json) before a long upload run. → platform.md §3@adobe/aem-cli -
Block cell content uses stricter inline-tag normalization than default content. Inside block cells, the pipeline rewrites/
<b>/<i>/<s>/<mark>to their semantic equivalents (<kbd>/<strong>/<em>/<del>/<em>), strips<code>and<span>, and applies positional rules to<ins>. Visual styling survives the rewrites but CSS selectors targeting the original tags or stripped classes stop matching. Generate cell content using only the §3.9 preserve list to avoid silent reshaping. → html-content.md §3.9<br>
若违反这些规则,会导致内容损坏,但DA、流水线或渲染器不会返回任何错误。请牢记这些规则,并在上传前验证生成的输出是否符合要求。
-
DA HTML是body片段。不包含、
<!DOCTYPE>、<html>、<head>、<script>,也不包含内联<style>属性。交付时,流水线会从Code Bus注入头部/脚本/样式。 → html-content.md第1节style= -
区块类名编码区块标识(标准div形式)。最外层带有
<div>。第一个类名是区块名称,对应class="<block-name> [<variant>…]"。对于兼容的表格替代形式,表头为/blocks/<name>/<name>.{js,css},其中<tr><td colspan="N">Name</td></tr>与最宽内容行的单元格数量匹配;单列区块可省略N。格式错误的区块(缺失div类名、多列表格缺失colspan、表头单元格为空)会以纯HTML形式渲染,无区块JS或CSS。 → html-content.md第3节colspan -
区块名称仅使用字母数字+单个连字符。不允许下划线、双连字符、以数字开头的名称。div形式的变体:名称后的额外类名()。表格形式的变体:名称后的括号(
class="hero cta center")。两者通过Hero (cta, center)方法规范化为相同格式。 → html-content.md第3节toBlockCSSClassNames -
页面元数据区块名称必须为。div形式:
metadata(单个小写标识)。表格形式:表头文本class="metadata"(大小写不敏感)。任何拼写错误都会被静默忽略 —— 不会生成Metadata标签。 → html-content.md第5节<meta> -
URL必须能从EDS预览基础设施访问。预览步骤会获取每个
<img src>和<img src>的URL,对字节内容进行哈希处理,并存储到Media Bus —— 这是交付页面获得响应式<source srcset>变体的方式。任何无法返回图片字节的URL(DNS失败、4xx/5xx错误、HTML响应、超时>5秒)都会生成<picture>。无主机路径(仓库相对路径<img src="about:error">、文档相对路径/path/foo.png)也会失败,因为摄取器无法获取内容。外部URL可正常工作,并在首次预览时被侧载。 → media.md第2节,html-content.md第9节./foo.png -
仅当需要URL稳定性时才预上传二进制文件。侧载意味着你无需先将图片上传至DA再在HTML中引用 —— 任何可访问的URL均可使用。当你希望二进制文件受DA控制时(不受第三方主机变更影响、可通过稳定的URL访问、每次预览时重新拉入Media Bus),预上传至
content.da.live。 → media.md第2.5节,media.md第13.2节/media/<scope>/<file> -
DA Source API要求使用格式且字段名为
multipart/form-data。其他字段名(data、file)会返回200 OK,但不会写入文件。 → platform.md第2节image -
SVG大小上限为40 KB。PNG/JPG/AVIF/WEBP上限为20 MB。MP4上限为36 MB。超过大小上限的SVG会导致预览POST请求失败,返回("Images N have failed validation");上传前请预先检查文件大小。 → media.md第6.1节
409 AEM_BACKEND_FETCH_FAILED -
预览/发布是必需的单独步骤。上传至DA不会使文档在/
aem.page上可见。上传后需POST至aem.live,然后再POST至admin.hlx.page/preview/...。 → platform.md第6节/live/... -
IMS令牌会静默过期,返回401+空响应体。开发令牌有效期为24小时。在长时间上传运行前,务必根据缓存令牌文件(da-auth技能使用,
~/.aem/da-token.json工具使用@adobe/aem-cli)中的.hlx/.da-token.json预检查是否过期。 → platform.md第3节expires_at -
区块单元格内容比默认内容使用更严格的内联标签规范化。在区块单元格内,流水线会将/
<b>/<i>/<s>/<mark>重写为对应的语义标签(<kbd>/<strong>/<em>/<del>/<em>),移除<code>和<span>,并对<ins>应用位置规则。视觉样式会保留,但针对原始标签或已移除类名的CSS选择器将不再匹配。请仅使用第3.9节中的保留标签生成单元格内容,避免静默格式重塑。 → html-content.md第3.9节<br>
Glossary
术语表
Terms used across all three references.
- Admin API — endpoint family. Controls document lifecycle (preview, publish, status). Distinct from the DA Source API.
https://admin.hlx.page/<action>/... - Code Bus — files delivered from the git-tracked GitHub branch
(typically ,
/fonts/,/icons/,/blocks/,/scripts/,/styles/). Updated by code deploy./head.html - Content Bus — files delivered from DA at their original path (SVG, PDF, HTML, JSON, ICO, WOFF2). Updated by preview/publish.
- DA editor — the web UI at for human authoring of documents.
https://da.live/edit#/... - DA Source API — endpoint for read/write of DA-tracked files (HTML and binaries).
https://admin.da.live/source/... - Default content — anything in an EDS page outside a block: headings, paragraphs, lists, links, images. Renders as standard HTML.
- Dot-folder — folder created automatically by the DA editor for per-document author uploads of images.
/<parent>/.<docname>/ - EDS — Edge Delivery Services. The rendering pipeline that serves
(preview) and
aem.page(production), consuming DA contentaem.live- Code Bus + Media Bus.
- IMS token — Adobe Identity Management access token. Cached at
(via the da-auth skill) or
~/.aem/da-token.json(via the.hlx/.da-token.jsontool). Used for auth against the DA Source API and the Admin API.@adobe/aem-cli - Media Bus — content-addressed backend for image and video binaries (PNG, JPG, AVIF, WEBP, MP4). Dedup by SHA hash; permanent cache.
- folder — top-level DA folder convention for shared binaries referenced across documents/branches/iterations. Auto-creates on first PUT.
/media - Preview / Publish — Admin API operations that promote a document
from "stored in DA" to "available at " (preview) or "available at
aem.page" (publish).aem.live - Section — a directly inside
<div>in a DA HTML document. Becomes<main>after decoration.<div class="section"> - Section Metadata — block whose key adds CSS classes to the enclosing section. NOT for SEO metadata (that's Page Metadata).
Style - Page Metadata — block whose key/value rows become
<head>tags at delivery. One per page; conventionally last in document.<meta>
所有参考文档中使用的术语。
- Admin API —— 端点系列。控制文档生命周期(预览、发布、状态)。与DA Source API不同。
https://admin.hlx.page/<action>/... - Code Bus —— 从Git跟踪的GitHub分支交付的文件(通常为、
/fonts/、/icons/、/blocks/、/scripts/、/styles/)。通过代码部署更新。/head.html - Content Bus —— 从DA按原始路径交付的文件(SVG、PDF、HTML、JSON、ICO、WOFF2)。通过预览/发布更新。
- DA editor —— 位于的Web UI,用于人工创作文档。
https://da.live/edit#/... - DA Source API —— 端点,用于读写DA跟踪的文件(HTML和二进制文件)。
https://admin.da.live/source/... - Default content —— EDS页面中区块之外的任何内容:标题、段落、列表、链接、图片。以标准HTML形式渲染。
- Dot-folder —— DA编辑器自动创建的文件夹,用于每个文档的作者上传图片。
/<parent>/.<docname>/ - EDS —— Edge Delivery Services。提供(预览)和
aem.page(生产)服务的渲染流水线,消耗DA内容+Code Bus+Media Bus。aem.live - IMS token —— Adobe Identity Management访问令牌。缓存于(通过da-auth技能)或
~/.aem/da-token.json(通过.hlx/.da-token.json工具)。用于DA Source API和Admin API的认证。@adobe/aem-cli - Media Bus —— 基于内容寻址的图片和视频二进制文件(PNG、JPG、AVIF、WEBP、MP4)后端。通过SHA哈希去重;永久缓存。
- folder —— DA顶层文件夹约定,用于跨文档/分支/迭代引用的共享二进制文件。首次PUT时自动创建。
/media - Preview / Publish —— Admin API操作,将文档从“存储于DA”提升至“可在访问”(预览)或“可在
aem.page访问”(发布)。aem.live - Section —— DA HTML文档中直接位于内的
<main>。装饰后变为<div>。<div class="section"> - Section Metadata —— 其键为包含它的章节添加CSS类的区块。不用于SEO元数据(SEO元数据属于Page Metadata)。
Style - Page Metadata —— 其键值行在交付时变为中的
<head>标签的区块。每页一个;通常位于文档末尾。<meta>