feat(baoyu-post-to-wechat): add default color preference and modern theme support

This commit is contained in:
Jim Liu 宝玉
2026-02-28 11:48:59 -06:00
parent 7133d54f04
commit 6e18725906
4 changed files with 52 additions and 19 deletions
@@ -20,9 +20,9 @@ npx -y bun ./scripts/wechat-article.ts --markdown article.md --author "作者名
| Parameter | Description |
|-----------|-------------|
| `--markdown <path>` | Markdown file to convert and post |
| `--theme <name>` | Theme: default, grace, or simple |
| `--theme <name>` | Theme: default, grace, simple, modern |
| `--title <text>` | Override title (auto-extracted from markdown) |
| `--author <name>` | Author name (default: 宝玉) |
| `--author <name>` | Author name |
| `--summary <text>` | Article summary |
| `--html <path>` | Pre-rendered HTML file (alternative to markdown) |
| `--profile <dir>` | Chrome profile directory |
@@ -49,14 +49,34 @@ header: "Theme"
question: "Default theme for article conversion?"
options:
- label: "default (Recommended)"
description: "Classic layout - centered title with border, white-on-color H2"
description: "Classic layout - centered title with border, white-on-color H2 (default: blue)"
- label: "grace"
description: "Elegant - text shadows, rounded cards, refined blockquotes"
description: "Elegant - text shadows, rounded cards, refined blockquotes (default: purple)"
- label: "simple"
description: "Minimal modern - asymmetric rounded corners, clean whitespace"
description: "Minimal modern - asymmetric rounded corners, clean whitespace (default: green)"
- label: "modern"
description: "Large rounded corners, pill headings, spacious (default: orange)"
```
### Question 2: Default Publishing Method
### Question 2: Default Color
```yaml
header: "Color"
question: "Default color preset? (theme default if not set)"
options:
- label: "Theme default (Recommended)"
description: "Use the theme's built-in default color"
- label: "blue"
description: "#0F4C81 经典蓝"
- label: "red"
description: "#A93226 中国红"
- label: "green"
description: "#009874 翡翠绿"
```
Note: User can choose "Other" to type any preset name (vermilion, yellow, purple, sky, rose, olive, black, gray, pink, orange) or hex value.
### Question 3: Default Publishing Method
```yaml
header: "Method"
@@ -68,7 +88,7 @@ options:
description: "Slow, requires Chrome and login session"
```
### Question 3: Default Author
### Question 4: Default Author
```yaml
header: "Author"
@@ -80,7 +100,7 @@ options:
Note: User will likely choose "Other" to type their author name.
### Question 4: Open Comments
### Question 5: Open Comments
```yaml
header: "Comments"
@@ -92,7 +112,7 @@ options:
description: "Disable comments by default"
```
### Question 5: Fans-Only Comments
### Question 6: Fans-Only Comments
```yaml
header: "Fans only"
@@ -104,7 +124,7 @@ options:
description: "Only followers can comment"
```
### Question 6: Save Location
### Question 7: Save Location
```yaml
header: "Save"
@@ -133,7 +153,8 @@ options:
## EXTEND.md Template
```md
default_theme: [default/grace/simple]
default_theme: [default/grace/simple/modern]
default_color: [preset name, hex, or empty for theme default]
default_publish_method: [api/browser]
default_author: [author name or empty]
need_open_comment: [1/0]