Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Post articles and image-text content to WeChat Official Account via API or Chrome CDP, with markdown-to-WeChat HTML conversion.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/article-posting.md
1# Article Posting (文章发表)23Post markdown articles to WeChat Official Account with full formatting support.45## Usage67```bash8# Post markdown article9${BUN_X} ./scripts/wechat-article.ts --markdown article.md1011# With theme12${BUN_X} ./scripts/wechat-article.ts --markdown article.md --theme grace1314# Disable bottom citations for ordinary external links15${BUN_X} ./scripts/wechat-article.ts --markdown article.md --no-cite1617# With explicit options18${BUN_X} ./scripts/wechat-article.ts --markdown article.md --author "作者名" --summary "摘要"19```2021## Parameters2223| Parameter | Description |24|-----------|-------------|25| `--markdown <path>` | Markdown file to convert and post |26| `--theme <name>` | Theme: default, grace, simple, modern |27| `--no-cite` | Keep ordinary external links inline instead of converting them to bottom citations |28| `--title <text>` | Override title (auto-extracted from markdown) |29| `--author <name>` | Author name |30| `--summary <text>` | Article summary |31| `--html <path>` | Pre-rendered HTML file (alternative to markdown) |32| `--profile <dir>` | Chrome profile directory |3334## Markdown Format3536```markdown37---38title: Article Title39author: Author Name40---4142# Title (becomes article title)4344Regular paragraph with **bold** and *italic*.4546## Section Header47484950- List item 151- List item 25253> Blockquote text5455[Link text](https://example.com)56```5758Markdown mode converts ordinary external links into bottom citations by default for WeChat-friendly output. Use `--no-cite` to disable that behavior.5960## Image Handling61621. **Parse**: Images in markdown are replaced with `WECHATIMGPH_N`632. **Render**: HTML is generated with placeholders in text643. **Paste**: HTML content is pasted into WeChat editor654. **Replace**: For each placeholder:66- Find and select the placeholder text67- Scroll into view68- Press Backspace to delete the placeholder69- Paste the image from clipboard7071## Scripts7273| Script | Purpose |74|--------|---------|75| `wechat-article.ts` | Main article publishing script |76| `md-to-wechat.ts` | Markdown to HTML with placeholders |77| `md/render.ts` | Markdown rendering with themes |7879## Example Session8081```82User: /post-to-wechat --markdown ./article.md8384Claude:851. Parses markdown, finds 5 images862. Generates HTML with placeholders873. Opens Chrome, navigates to WeChat editor884. Pastes HTML content895. For each image:90- Selects WECHATIMGPH_191- Scrolls into view92- Presses Backspace to delete93- Pastes image946. Reports: "Article composed with 5 images."95```96