- 新建插件,类型选 theme,插件 ID 如 acme.dev.ocean。
- 写 theme.json:id 必须是 market.<插件 ID>,version 与插件版本相同。
- 把 theme.json 的 SHA-256 写进 spec.entrypoint.sha256,权限只写 platform.themes.provide,签名并上传。
{
"schema": "cdnca.theme/v1",
"id": "market.acme.dev.ocean",
"version": "1.0.0",
"name": {"zh-CN": "海蓝", "en-US": "Ocean"},
"description": {"zh-CN": "蓝色系主控外观"},
"tokens": {"colorPrimary": "#1769aa", "borderRadius": 6},
"layout_slots": {"login_layout": "centered", "sidebar": "dark"},
"templates": {
"styles": [{"selector": ".cf-page", "declarations": {"background-color": "token:colorBgContainer"}}],
"error_page": "<!doctype html><html><head><title>{{title}}</title></head><body><main class=\"cf-page\"><h1>{{status}} {{title}}</h1><p>{{message}}</p></main></body></html>",
"email": "<!doctype html><html><head><title>{{subject}}</title></head><body><main class=\"cf-page\">{{#lines}}<p>{{.}}</p>{{/lines}}</main></body></html>"
}
}签名与公钥登记见插件签名工具页。 签名工具与步骤 →