将 Markdown 文件或原始 Markdown 字符串统一转换为精美的 DOCX 或 HTML 输出,支持自定义 DOCX 参考模板和 Pandoc 过滤器。
Use this skill when the user wants one Markdown source exported into docx, html, or both.
docx and htmldocx
Uses a Word reference.docx style templatehtml
Uses a Pandoc HTML template plus CSSmodern-blueexecutive-serifwarm-notebookminimal-graydocs-slatemagazine-amberproduct-midnightserif-paperList everything with:
bash
python3 scripts/export_markdown.py --list-templates
Only list one format with:
bash
python3 scripts/export_markdown.py --format html --list-templates
bash
python3 scripts/export_markdown.py \
--format docx \
--input-file /abs/path/source.md \
--output /abs/path/output.docx \
--builtin-template modern-blue \
--toc \
--number-sections
bash
python3 scripts/export_markdown.py \
--format html \
--input-file /abs/path/source.md \
--output /abs/path/output.html \
--builtin-template docs-slate \
--toc \
--embed-assets
bash
python3 scripts/export_markdown.py \
--format html \
--input-file /abs/path/source.md \
--output /abs/path/output.html \
--builtin-template docs-slate \
--embed-assets \
--no-body-background
bash
python3 scripts/export_markdown.py \
--format html \
--markdown '# Release Notes\n\n- Export to both HTML and DOCX with one skill' \
--output /abs/path/release.html \
--builtin-template magazine-amber \
--title 'Release Notes'
docx --template must point to a .docx reference documenthtml --template must point to a Pandoc HTML template that contains $body$--css files are appended after built-in CSS--toc removes the TOC panel and expands the article body to full width--no-body-background removes the article panel background, border, and shadow while keeping the page themescripts/export_markdown.pyassets/docx/templates/*.docxassets/html/templates/*.htmlassets/html/styles/*.csspandoc to be installed and available on PATH--template