๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ
ๅฐ้พ™่™พๅฐ้พ™่™พAI
๐Ÿค–

WeChat MP Multi-Publisher

Publish one or multiple Markdown articles to WeChat Official Account (ๅ…ฌไผ—ๅท) draft box in a single API call. Supports multi-article combined drafts (main artic...

ไธ‹่ฝฝ1.4k
ๆ˜Ÿๆ ‡3
็‰ˆๆœฌ1.0.0
ๅ•†ไธš่ฟ่ฅ
ๅฎ‰ๅ…จ้€š่ฟ‡
โš™๏ธ่„šๆœฌ

ๆŠ€่ƒฝ่ฏดๆ˜Ž


name: wechat-mp-publisher description: "Publish one or multiple Markdown articles to WeChat Official Account (ๅ…ฌไผ—ๅท) draft box in a single API call. Supports multi-article combined drafts (main article + sub-articles), smart cover image selection with Unsplash auto-match + 12-image fallback rotation, custom styling (gold quote highlights, && section dividers, accent headings), inline image auto-upload to WeChat CDN, digest auto-extraction, and optional immediate publish. Activate when user wants to push Markdown files to WeChat MP, publish to ๅ…ฌไผ—ๅท่‰็จฟ็ฎฑ, schedule WeChat articles, or automate public account content delivery."

wechat-mp-publisher

Publish Markdown articles to WeChat Official Account draft box.

Key features

  • Multi-article push โ€” main article + up to 7 sub-articles in one draft (unique vs single-article tools)
  • Smart cover images โ€” keyword-matched Unsplash + 12-image fallback pool, each article gets a different cover
  • Custom styling โ€” gold quote highlights, && section dividers, accent-colored headings
  • Inline images โ€” local PNG/JPG auto-uploaded to WeChat CDN
  • Flexible credentials โ€” env vars or ~/.config/wechat-mp/credentials.json

Quick start

# 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.

Markdown conventions

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:

  • ็œŸๆญฃ็š„... / ไธๆ˜ฏ...่€Œๆ˜ฏ... / ๅบ•ๅฑ‚้€ป่พ‘ๆ˜ฏ... / ๅ…ณ้”ฎไธๆ˜ฏ...

CLI reference

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

Author field

Set WECHAT_AUTHOR env var to customize the author name shown in WeChat.

ๅฆ‚ไฝ•ไฝฟ็”จใ€ŒWeChat MP Multi-Publisherใ€๏ผŸ

  1. ๆ‰“ๅผ€ๅฐ้พ™่™พAI๏ผˆWeb ๆˆ– iOS App๏ผ‰
  2. ็‚นๅ‡ปไธŠๆ–นใ€Œ็ซ‹ๅณไฝฟ็”จใ€ๆŒ‰้’ฎ๏ผŒๆˆ–ๅœจๅฏน่ฏๆก†ไธญ่พ“ๅ…ฅไปปๅŠกๆ่ฟฐ
  3. ๅฐ้พ™่™พAI ไผš่‡ชๅŠจๅŒน้…ๅนถ่ฐƒ็”จใ€ŒWeChat MP Multi-Publisherใ€ๆŠ€่ƒฝๅฎŒๆˆไปปๅŠก
  4. ็ป“ๆžœๅณๆ—ถๅ‘ˆ็Žฐ๏ผŒๆ”ฏๆŒ็ปง็ปญๅฏน่ฏไผ˜ๅŒ–

็›ธๅ…ณๆŠ€่ƒฝ