Publish Markdown articles to WeChat Official Account draft box.
&& section dividers, accent-colored headings~/.config/wechat-mp/credentials.json# Install dependency
npm install @wenyan-md/core
# Set credentials
export WECHAT_APP_ID=your_appid
export WECHAT_APP_SECRET=your_appsecret
# Push to draft box
node scripts/publish.mjs main-article.md [sub-article.md ...]
See references/setup.md for full credential setup, IP whitelist, and cron automation.
Section divider (renders as gradient rule):
paragraph text
&&
next paragraph
Section header (renders as accented H2):
&& My Section Title
Gold quotes — automatically highlighted when text starts with:
真正的... / 不是...而是... / 底层逻辑是... / 关键不是...node scripts/publish.mjs <main.md> [sub1.md] [sub2.md] ...
--dry-run Render to /tmp/wechat-preview/ without uploading
--publish Also trigger freepublish after draft creation
--media-id=xxx Publish an existing draft by media_id
Set WECHAT_AUTHOR env var to customize the author name shown in WeChat.
共 1 个版本