render_markdown
Renders Markdown document envelopes into paginated card PNGs, applying platform headers, themes, web fonts, and automatic page breaks, then saves numbered images to the output directory.
Instructions
把 Markdown 文档信封无头渲染为一套卡片 PNG(与 Markdown 工作台导出同一管线:DOM 实测分页、平台头部与主题、网页字体按字符子集嵌入、逐页 pixelRatio 3 导出)。输出 -01.png、-02.png… 到 outputDir;页数由分页决定。 document 为 Markdown 文档信封:{ source: Markdown 文本(--- 为手动分页), platformId: 'rednote'|'weibo'|'twitter', themeId: 主题 id(如 'light'), fontFamily, radius: 数字圆角, profile: { nickname, handle, location, avatarColor, avatarImage: dataURL 或 null, verified, headerFirstPageOnly }, images?: { "img:": dataURL } }。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| baseName | No | 输出文件名前缀,默认 "dingcard" | |
| document | Yes | Markdown 文档信封 JSON | |
| previews | No | 是否附上缩略图,默认 true | |
| outputDir | Yes | PNG 输出目录(不存在会创建) |