doc-convert · Markdown Layout Conversion

Markdown layout conversion: takes a Markdown manuscript and renders it into HTML (clean readable layout + CJK fonts), printable PDF (A4), or long-image PNG (for Moments/social posts) — one command, three formats.
Markdown only: DOCX/PPT out of scope, outlines-to-mindmaps via mindmap, WeChat-OA-specific layout via skill-wechat-publisher, posters via card-*/poster-hero. Outputs go to outputs/主题名/ uniformly.
Example invocation: "Convert this Markdown into a PDF and a long image."
Full brief
Positioning
doc-convert is a Markdown layout and multi-format converter: one input, three outputs (HTML / PDF / long-image PNG). Markdown only.
Core capabilities
- Three-format output: HTML (clean readable layout + CJK fonts) / PDF (A4 printable, for archiving/sending) / long-image PNG (for platforms without MD support, Moments archiving).
- One-command conversion:
scripts/doc_convert.py convert -i input.md -o outputs/topic/x.{html,pdf,png}. - Layout parameters: long-image
--widthtuned per platform (~750–1080 for Moments/Xiaohongshu);--page-widthcontrols the HTML/PDF text column. - Environment prerequisites: MD→HTML needs
pip install markdown; MD→PDF/PNG needs playwright + chromium.
Workflow
- Receive the Markdown file (headings, lists, tables, code blocks, quotes, images)
- Run the conversion script with the target format
- Save outputs to
outputs/主题名/
Inputs & outputs
| Input | Notes |
|---|---|
| Markdown file | Required — images must use accessible relative/absolute paths |
Output: HTML / PDF / long-image PNG, all under outputs/主题名/.
Boundaries with adjacent skills
| Skill | Lane |
|---|---|
| doc-convert (this) | Generic Markdown layout conversion (HTML/PDF/long-image) |
| mindmap | Outline → mind map |
| skill-wechat-publisher | WeChat-OA-specific layout |
| card-*/poster-hero | Card/poster design |
Fit
- Articles as long images for Moments/Xiaohongshu
- Manuscripts exported to PDF for archiving or sending
- Markdown rendered as clean HTML pages
Before you start
- Prepare the Markdown file; images need accessible paths.
- DOCX/PPT/rich-interactive layouts are out of scope.
doc-convert is part of the Aiglade Skill library. Invoke it from the Aiglade chat box in plain language.