将 Markdown 文件或原始 Markdown 文本转换为精美的 HTML 文档。支持自定义 Pandoc HTML 模板、自定义 CSS,以及内置 HTML 模板。
Use this skill when the user wants a Markdown file or Markdown string converted into a polished HTML page.
pandoc--template /path/to/template.html--css /path/to/file.cssassets/templates/ and assets/styles/--input-file /abs/path/file.md
Raw string input: pass --markdown '...'--template for a fully custom Pandoc HTML template.
Otherwise use --builtin-template.--css.--output /abs/path/output.html.--toc to render a table of contents panel.
Use --no-body-background to remove the article card background, border, and shadow.docs-slate: technical docs layout with restrained slate tonesmagazine-amber: editorial landing-page feel with warm contrastproduct-midnight: dark product narrative with stronger gradientsserif-paper: print-inspired article layoutList them at runtime with:
bash
python3 scripts/markdown_to_html.py --list-templates
bash
python3 scripts/markdown_to_html.py \
--input-file /abs/path/source.md \
--output /abs/path/output.html \
--builtin-template docs-slate \
--toc \
--number-sections \
--embed-assets
bash
python3 scripts/markdown_to_html.py \
--markdown '# Release Notes\n\n- Added HTML export\n- Added built-in themes' \
--output /abs/path/release.html \
--builtin-template magazine-amber \
--title 'Release Notes'
--template overrides --builtin-template--css files are appended after the built-in CSS, so local overrides win--number-sections enables Pandoc heading numbering in the generated HTML--number-sections is enabled, avoid manually writing heading prefixes like 1., 2.1, or 3.2 inside the Markdown heading text, or the output will show duplicated numbering such as 1.2.1 2.1 Title--toc is omitted, the built-in templates render only the article body and expand it to the full content width--no-body-background removes the article panel background, border, and shadow while keeping the overall page themescripts/markdown_to_html.pyassets/templates/*.htmlassets/styles/*.csspandoc to be installed and available on PATH$body$--toc without --number-sections