Skip to content

Commands Render

packy edited this page Jun 18, 2026 · 1 revision

render — 本地渲染

将 Markdown 渲染为 HTML 并保存到本地,不调用微信 API。支持排版主题和代码高亮切换。

用法

wx-newspic render --md article.md --output preview.html --open
wx-newspic render --md article.md --theme orangeheart --hl-theme dracula --open

参数说明

参数 必填 默认值 说明
--md, -m Markdown 文件路径
--output, -o {文件名}.html 输出 HTML 文件路径
--theme default 排版主题
--hl-theme github-dark 代码高亮主题,如 draculaatom-one-dark
--theme-file, -f 自定义主题 CSS 文件路径(需同时指定 --theme <名称>
--open, -O 渲染后用默认浏览器打开

Clone this wiki locally