mirror of
https://github.com/JimLiu/baoyu-skills.git
synced 2026-07-16 23:49:47 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a7d6b5c69b | |||
| 6e18725906 | |||
| 7133d54f04 | |||
| 208bb20e98 | |||
| 6edc1b7822 |
@@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
"description": "Skills shared by Baoyu for improving daily work efficiency",
|
||||||
"version": "1.40.1"
|
"version": "1.42.0"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
English | [中文](./CHANGELOG.zh.md)
|
English | [中文](./CHANGELOG.zh.md)
|
||||||
|
|
||||||
|
## 1.42.0 - 2026-02-28
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-markdown-to-html`: consolidate heritage and warm into single modern theme, add per-theme color defaults (default→blue, grace→purple, simple→green, modern→orange)
|
||||||
|
- `baoyu-post-to-wechat`: add default color preference support in EXTEND.md, add modern theme option to first-time setup
|
||||||
|
|
||||||
|
## 1.41.0 - 2026-02-28
|
||||||
|
|
||||||
|
### Features
|
||||||
|
- `baoyu-markdown-to-html`: rename themes (red→heritage, orange→warm), add 13 named color presets, serif-cjk font family, and per-theme style defaults
|
||||||
|
|
||||||
## 1.40.1 - 2026-02-28
|
## 1.40.1 - 2026-02-28
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -2,6 +2,17 @@
|
|||||||
|
|
||||||
[English](./CHANGELOG.md) | 中文
|
[English](./CHANGELOG.md) | 中文
|
||||||
|
|
||||||
|
## 1.42.0 - 2026-02-28
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-markdown-to-html`:合并 heritage 和 warm 为 modern 主题,新增主题默认颜色(default→蓝、grace→紫、simple→绿、modern→橙)
|
||||||
|
- `baoyu-post-to-wechat`:EXTEND.md 新增默认颜色配置,首次设置增加 modern 主题和颜色选择
|
||||||
|
|
||||||
|
## 1.41.0 - 2026-02-28
|
||||||
|
|
||||||
|
### 新功能
|
||||||
|
- `baoyu-markdown-to-html`:重命名主题(red→heritage、orange→warm),新增 13 个颜色预设、serif-cjk 字体、主题级样式默认值
|
||||||
|
|
||||||
## 1.40.1 - 2026-02-28
|
## 1.40.1 - 2026-02-28
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|||||||
@@ -92,8 +92,7 @@ test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && grep -o 'default
|
|||||||
| `default` (Recommended) | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
| `default` (Recommended) | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
||||||
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 |
|
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 |
|
||||||
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 |
|
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 |
|
||||||
| `red` | 红色主题 - 红金配色,宋体排版,传统书法风格 |
|
| `modern` | 现代主题 - 大圆角、药丸形标题、宽松行距(搭配 `--color red` 还原传统红金风格) |
|
||||||
| `orange` | 橙色主题 - 暖色调现代风,宽松行距,圆角装饰 |
|
|
||||||
|
|
||||||
### Step 2: Convert
|
### Step 2: Convert
|
||||||
|
|
||||||
@@ -115,11 +114,32 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts <markdown_file> [options]
|
|||||||
|
|
||||||
| Option | Description | Default |
|
| Option | Description | Default |
|
||||||
|--------|-------------|---------|
|
|--------|-------------|---------|
|
||||||
| `--theme <name>` | Theme name (default, grace, simple, red, orange) | default |
|
| `--theme <name>` | Theme name (default, grace, simple, modern) | default |
|
||||||
|
| `--color <name\|hex>` | Primary color: preset name or hex value | theme default |
|
||||||
|
| `--font-family <name>` | Font: sans, serif, serif-cjk, mono, or CSS value | theme default |
|
||||||
|
| `--font-size <N>` | Font size: 14px, 15px, 16px, 17px, 18px | 16px |
|
||||||
| `--title <title>` | Override title from frontmatter | |
|
| `--title <title>` | Override title from frontmatter | |
|
||||||
| `--keep-title` | Keep the first heading in content | false (removed) |
|
| `--keep-title` | Keep the first heading in content | false (removed) |
|
||||||
| `--help` | Show help | |
|
| `--help` | Show help | |
|
||||||
|
|
||||||
|
**Color Presets:**
|
||||||
|
|
||||||
|
| Name | Hex | Label |
|
||||||
|
|------|-----|-------|
|
||||||
|
| blue | #0F4C81 | 经典蓝 |
|
||||||
|
| green | #009874 | 翡翠绿 |
|
||||||
|
| vermilion | #FA5151 | 活力橘 |
|
||||||
|
| yellow | #FECE00 | 柠檬黄 |
|
||||||
|
| purple | #92617E | 薰衣紫 |
|
||||||
|
| sky | #55C9EA | 天空蓝 |
|
||||||
|
| rose | #B76E79 | 玫瑰金 |
|
||||||
|
| olive | #556B2F | 橄榄绿 |
|
||||||
|
| black | #333333 | 石墨黑 |
|
||||||
|
| gray | #A9A9A9 | 雾烟灰 |
|
||||||
|
| pink | #FFB7C5 | 樱花粉 |
|
||||||
|
| red | #A93226 | 中国红 |
|
||||||
|
| orange | #D97757 | 暖橘 (modern default) |
|
||||||
|
|
||||||
**Examples:**
|
**Examples:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -129,6 +149,9 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts article.md
|
|||||||
# With specific theme
|
# With specific theme
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --theme grace
|
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --theme grace
|
||||||
|
|
||||||
|
# Theme with custom color
|
||||||
|
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --theme modern --color red
|
||||||
|
|
||||||
# Keep the first heading in content
|
# Keep the first heading in content
|
||||||
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --keep-title
|
npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --keep-title
|
||||||
|
|
||||||
@@ -171,8 +194,7 @@ npx -y bun ${SKILL_DIR}/scripts/main.ts article.md --title "My Article"
|
|||||||
| `default` | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
| `default` | 经典主题 - 传统排版,标题居中带底边,二级标题白字彩底 |
|
||||||
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 (by @brzhang) |
|
| `grace` | 优雅主题 - 文字阴影,圆角卡片,精致引用块 (by @brzhang) |
|
||||||
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 (by @okooo5km) |
|
| `simple` | 简洁主题 - 现代极简风,不对称圆角,清爽留白 (by @okooo5km) |
|
||||||
| `red` | 红色主题 - 红金配色,宋体排版,传统书法风格 |
|
| `modern` | 现代主题 - 大圆角、药丸形标题、宽松行距(搭配 `--color red` 还原传统红金风格) |
|
||||||
| `orange` | 橙色主题 - 暖色调现代风,宽松行距,圆角装饰 |
|
|
||||||
|
|
||||||
## Supported Markdown Features
|
## Supported Markdown Features
|
||||||
|
|
||||||
|
|||||||
@@ -44,11 +44,28 @@ const FALLBACK_THEMES: ThemeName[] = ["default", "grace", "simple"];
|
|||||||
const FONT_FAMILY_MAP: Record<string, string> = {
|
const FONT_FAMILY_MAP: Record<string, string> = {
|
||||||
sans: `-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif`,
|
sans: `-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif`,
|
||||||
serif: `Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif`,
|
serif: `Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif`,
|
||||||
|
"serif-cjk": `"Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif CN", STSong, SimSun, serif`,
|
||||||
mono: `Menlo, Monaco, 'Courier New', monospace`,
|
mono: `Menlo, Monaco, 'Courier New', monospace`,
|
||||||
};
|
};
|
||||||
|
|
||||||
const FONT_SIZE_OPTIONS = ["14px", "15px", "16px", "17px", "18px"];
|
const FONT_SIZE_OPTIONS = ["14px", "15px", "16px", "17px", "18px"];
|
||||||
|
|
||||||
|
const COLOR_PRESETS: Record<string, string> = {
|
||||||
|
blue: "#0F4C81",
|
||||||
|
green: "#009874",
|
||||||
|
vermilion: "#FA5151",
|
||||||
|
yellow: "#FECE00",
|
||||||
|
purple: "#92617E",
|
||||||
|
sky: "#55C9EA",
|
||||||
|
rose: "#B76E79",
|
||||||
|
olive: "#556B2F",
|
||||||
|
black: "#333333",
|
||||||
|
gray: "#A9A9A9",
|
||||||
|
pink: "#FFB7C5",
|
||||||
|
red: "#A93226",
|
||||||
|
orange: "#D97757",
|
||||||
|
};
|
||||||
|
|
||||||
const CODE_BLOCK_THEMES = [
|
const CODE_BLOCK_THEMES = [
|
||||||
"1c-light", "a11y-dark", "a11y-light", "agate", "an-old-hope",
|
"1c-light", "a11y-dark", "a11y-light", "agate", "an-old-hope",
|
||||||
"androidstudio", "arduino-light", "arta", "ascetic",
|
"androidstudio", "arduino-light", "arta", "ascetic",
|
||||||
@@ -77,6 +94,8 @@ interface StyleConfig {
|
|||||||
fontSize: string;
|
fontSize: string;
|
||||||
foreground: string;
|
foreground: string;
|
||||||
blockquoteBackground: string;
|
blockquoteBackground: string;
|
||||||
|
accentColor: string;
|
||||||
|
containerBg: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_STYLE: StyleConfig = {
|
const DEFAULT_STYLE: StyleConfig = {
|
||||||
@@ -85,6 +104,28 @@ const DEFAULT_STYLE: StyleConfig = {
|
|||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
foreground: "0 0% 3.9%",
|
foreground: "0 0% 3.9%",
|
||||||
blockquoteBackground: "#f7f7f7",
|
blockquoteBackground: "#f7f7f7",
|
||||||
|
accentColor: "#6B7280",
|
||||||
|
containerBg: "transparent",
|
||||||
|
};
|
||||||
|
|
||||||
|
const THEME_STYLE_DEFAULTS: Record<string, Partial<StyleConfig>> = {
|
||||||
|
default: {
|
||||||
|
primaryColor: COLOR_PRESETS.blue,
|
||||||
|
},
|
||||||
|
grace: {
|
||||||
|
primaryColor: COLOR_PRESETS.purple,
|
||||||
|
},
|
||||||
|
simple: {
|
||||||
|
primaryColor: COLOR_PRESETS.green,
|
||||||
|
},
|
||||||
|
modern: {
|
||||||
|
primaryColor: COLOR_PRESETS.orange,
|
||||||
|
accentColor: "#E4B1A0",
|
||||||
|
containerBg: "rgba(250, 249, 245, 1)",
|
||||||
|
fontFamily: FONT_FAMILY_MAP.sans,
|
||||||
|
fontSize: "15px",
|
||||||
|
blockquoteBackground: "rgba(255, 255, 255, 0.6)",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
Object.entries(COMMON_LANGUAGES).forEach(([name, lang]) => {
|
Object.entries(COMMON_LANGUAGES).forEach(([name, lang]) => {
|
||||||
@@ -532,8 +573,8 @@ function printUsage(): void {
|
|||||||
"",
|
"",
|
||||||
"Options:",
|
"Options:",
|
||||||
` --theme <name> Theme (${THEME_NAMES.join(", ")})`,
|
` --theme <name> Theme (${THEME_NAMES.join(", ")})`,
|
||||||
` --color <hex> Primary color (default: ${DEFAULT_STYLE.primaryColor})`,
|
` --color <name|hex> Primary color: ${Object.keys(COLOR_PRESETS).join(", ")}, or hex`,
|
||||||
` --font-family <name> Font: sans, serif, mono, or CSS value`,
|
` --font-family <name> Font: ${Object.keys(FONT_FAMILY_MAP).join(", ")}, or CSS value`,
|
||||||
` --font-size <N> Font size: ${FONT_SIZE_OPTIONS.join(", ")} (default: 16px)`,
|
` --font-size <N> Font size: ${FONT_SIZE_OPTIONS.join(", ")} (default: 16px)`,
|
||||||
` --code-theme <name> Code highlight theme (default: github)`,
|
` --code-theme <name> Code highlight theme (default: github)`,
|
||||||
` --mac-code-block Show Mac-style code block header`,
|
` --mac-code-block Show Mac-style code block header`,
|
||||||
@@ -559,15 +600,19 @@ function resolveFontFamily(value: string): string {
|
|||||||
return FONT_FAMILY_MAP[value] ?? value;
|
return FONT_FAMILY_MAP[value] ?? value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resolveColor(value: string): string {
|
||||||
|
return COLOR_PRESETS[value] ?? value;
|
||||||
|
}
|
||||||
|
|
||||||
function parseArgs(argv: string[]): CliOptions | null {
|
function parseArgs(argv: string[]): CliOptions | null {
|
||||||
const ext = loadExtendConfig();
|
const ext = loadExtendConfig();
|
||||||
|
|
||||||
let inputPath = "";
|
let inputPath = "";
|
||||||
let theme: ThemeName = ext.default_theme ?? "default";
|
let theme: ThemeName = ext.default_theme ?? "default";
|
||||||
let keepTitle = ext.keep_title ?? false;
|
let keepTitle = ext.keep_title ?? false;
|
||||||
let primaryColor = ext.default_color ?? DEFAULT_STYLE.primaryColor;
|
let primaryColor: string | undefined = ext.default_color ? resolveColor(ext.default_color) : undefined;
|
||||||
let fontFamily = ext.default_font_family ? resolveFontFamily(ext.default_font_family) : DEFAULT_STYLE.fontFamily;
|
let fontFamily: string | undefined = ext.default_font_family ? resolveFontFamily(ext.default_font_family) : undefined;
|
||||||
let fontSize = ext.default_font_size ?? DEFAULT_STYLE.fontSize;
|
let fontSize: string | undefined = ext.default_font_size ?? undefined;
|
||||||
let codeTheme = ext.default_code_theme ?? "github";
|
let codeTheme = ext.default_code_theme ?? "github";
|
||||||
let isMacCodeBlock = ext.mac_code_block ?? true;
|
let isMacCodeBlock = ext.mac_code_block ?? true;
|
||||||
let isShowLineNumber = ext.show_line_number ?? false;
|
let isShowLineNumber = ext.show_line_number ?? false;
|
||||||
@@ -605,7 +650,7 @@ function parseArgs(argv: string[]): CliOptions | null {
|
|||||||
if (arg === "--color" || arg.startsWith("--color=")) {
|
if (arg === "--color" || arg.startsWith("--color=")) {
|
||||||
const val = parseArgValue(argv, i, "--color");
|
const val = parseArgValue(argv, i, "--color");
|
||||||
if (!val) { console.error("Missing value for --color"); return null; }
|
if (!val) { console.error("Missing value for --color"); return null; }
|
||||||
primaryColor = val;
|
primaryColor = resolveColor(val);
|
||||||
if (!arg.includes("=")) i += 1;
|
if (!arg.includes("=")) i += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -678,9 +723,9 @@ interface CliOptions {
|
|||||||
inputPath: string;
|
inputPath: string;
|
||||||
theme: ThemeName;
|
theme: ThemeName;
|
||||||
keepTitle: boolean;
|
keepTitle: boolean;
|
||||||
primaryColor: string;
|
primaryColor?: string;
|
||||||
fontFamily: string;
|
fontFamily?: string;
|
||||||
fontSize: string;
|
fontSize?: string;
|
||||||
codeTheme: string;
|
codeTheme: string;
|
||||||
isMacCodeBlock: boolean;
|
isMacCodeBlock: boolean;
|
||||||
isShowLineNumber: boolean;
|
isShowLineNumber: boolean;
|
||||||
@@ -883,6 +928,8 @@ function buildCss(baseCss: string, themeCss: string, style: StyleConfig = DEFAUL
|
|||||||
--md-font-size: ${style.fontSize};
|
--md-font-size: ${style.fontSize};
|
||||||
--foreground: ${style.foreground};
|
--foreground: ${style.foreground};
|
||||||
--blockquote-background: ${style.blockquoteBackground};
|
--blockquote-background: ${style.blockquoteBackground};
|
||||||
|
--md-accent-color: ${style.accentColor};
|
||||||
|
--md-container-bg: ${style.containerBg};
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@@ -978,11 +1025,15 @@ function normalizeCssText(cssText: string, style: StyleConfig = DEFAULT_STYLE):
|
|||||||
.replace(/var\(--md-font-family\)/g, style.fontFamily)
|
.replace(/var\(--md-font-family\)/g, style.fontFamily)
|
||||||
.replace(/var\(--md-font-size\)/g, style.fontSize)
|
.replace(/var\(--md-font-size\)/g, style.fontSize)
|
||||||
.replace(/var\(--blockquote-background\)/g, style.blockquoteBackground)
|
.replace(/var\(--blockquote-background\)/g, style.blockquoteBackground)
|
||||||
|
.replace(/var\(--md-accent-color\)/g, style.accentColor)
|
||||||
|
.replace(/var\(--md-container-bg\)/g, style.containerBg)
|
||||||
.replace(/hsl\(var\(--foreground\)\)/g, "#3f3f3f")
|
.replace(/hsl\(var\(--foreground\)\)/g, "#3f3f3f")
|
||||||
.replace(/--md-primary-color:\s*[^;"']+;?/g, "")
|
.replace(/--md-primary-color:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--md-font-family:\s*[^;"']+;?/g, "")
|
.replace(/--md-font-family:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--md-font-size:\s*[^;"']+;?/g, "")
|
.replace(/--md-font-size:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--blockquote-background:\s*[^;"']+;?/g, "")
|
.replace(/--blockquote-background:\s*[^;"']+;?/g, "")
|
||||||
|
.replace(/--md-accent-color:\s*[^;"']+;?/g, "")
|
||||||
|
.replace(/--md-container-bg:\s*[^;"']+;?/g, "")
|
||||||
.replace(/--foreground:\s*[^;"']+;?/g, "");
|
.replace(/--foreground:\s*[^;"']+;?/g, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1038,11 +1089,13 @@ async function main(): Promise<void> {
|
|||||||
options.inputPath.replace(/\.md$/i, ".html")
|
options.inputPath.replace(/\.md$/i, ".html")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const themeDefaults = THEME_STYLE_DEFAULTS[options.theme] ?? {};
|
||||||
const style: StyleConfig = {
|
const style: StyleConfig = {
|
||||||
...DEFAULT_STYLE,
|
...DEFAULT_STYLE,
|
||||||
primaryColor: options.primaryColor,
|
...themeDefaults,
|
||||||
fontFamily: options.fontFamily,
|
...(options.primaryColor !== undefined ? { primaryColor: options.primaryColor } : {}),
|
||||||
fontSize: options.fontSize,
|
...(options.fontFamily !== undefined ? { fontFamily: options.fontFamily } : {}),
|
||||||
|
...(options.fontSize !== undefined ? { fontSize: options.fontSize } : {}),
|
||||||
};
|
};
|
||||||
|
|
||||||
const { baseCss, themeCss } = loadThemeCss(options.theme);
|
const { baseCss, themeCss } = loadThemeCss(options.theme);
|
||||||
|
|||||||
+28
-28
@@ -1,23 +1,23 @@
|
|||||||
/**
|
/**
|
||||||
* MD 橙色主题
|
* MD 现代主题 (modern)
|
||||||
* 暖色调现代风,橙色主色,宽松行距
|
* 大圆角、药丸形标题、宽松行距、现代感
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ==================== 容器样式覆盖 ==================== */
|
/* ==================== 容器样式覆盖 ==================== */
|
||||||
section,
|
section,
|
||||||
container {
|
container {
|
||||||
font-family: PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;
|
font-family: var(--md-font-family);
|
||||||
font-size: 15px;
|
font-size: var(--md-font-size);
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
background-color: rgba(250, 249, 245, 1);
|
background-color: var(--md-container-bg);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.01);
|
border: 1px solid rgba(255, 255, 255, 0.01);
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
padding: 12px 12px;
|
padding: 12px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#output {
|
#output {
|
||||||
font-family: PingFang SC, system-ui, -apple-system, BlinkMacSystemFont, Helvetica Neue, Hiragino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Arial, sans-serif;
|
font-family: var(--md-font-family);
|
||||||
font-size: 15px;
|
font-size: var(--md-font-size);
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@ h1 {
|
|||||||
display: table;
|
display: table;
|
||||||
padding: 0.3em 1em;
|
padding: 0.3em 1em;
|
||||||
margin: 20px auto;
|
margin: 20px auto;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
background: #D97757;
|
background: var(--md-primary-color);
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -41,16 +41,16 @@ h2 {
|
|||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
margin: 0 auto 20px;
|
margin: 0 auto 20px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-bottom: 2px solid #E4B1A0;
|
border-bottom: 2px solid var(--md-accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 三级标题 ==================== */
|
/* ==================== 三级标题 ==================== */
|
||||||
h3 {
|
h3 {
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -58,7 +58,7 @@ h3 {
|
|||||||
/* ==================== 四级标题 ==================== */
|
/* ==================== 四级标题 ==================== */
|
||||||
h4 {
|
h4 {
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -68,7 +68,7 @@ h5 {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
background: rgba(255, 255, 255, 0.7);
|
background: rgba(255, 255, 255, 0.7);
|
||||||
border: 1px solid rgb(189, 224, 254);
|
border: 1px solid rgb(189, 224, 254);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
@@ -79,7 +79,7 @@ h5 {
|
|||||||
/* ==================== 六级标题 ==================== */
|
/* ==================== 六级标题 ==================== */
|
||||||
h6 {
|
h6 {
|
||||||
margin: 0 8px 10px;
|
margin: 0 8px 10px;
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ h6 {
|
|||||||
/* ==================== 段落 ==================== */
|
/* ==================== 段落 ==================== */
|
||||||
p {
|
p {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
line-height: 2;
|
line-height: 2;
|
||||||
letter-spacing: 0px;
|
letter-spacing: 0px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
@@ -97,15 +97,15 @@ p {
|
|||||||
blockquote {
|
blockquote {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
padding: 15px 12px;
|
padding: 15px 12px;
|
||||||
border-left: 7px solid rgba(228, 177, 160, 1);
|
border-left: 7px solid var(--md-accent-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
background-color: rgba(255, 255, 255, 0.6);
|
background-color: var(--blockquote-background);
|
||||||
margin: 12px 0;
|
margin: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
blockquote > p {
|
blockquote > p {
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ ul {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
margin: 0.2em 0;
|
margin: 0.2em 0;
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,35 +147,35 @@ li {
|
|||||||
hr {
|
hr {
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: 1px 0 0;
|
border-width: 1px 0 0;
|
||||||
border-color: #D97757;
|
border-color: var(--md-primary-color);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 强调 ==================== */
|
/* ==================== 强调 ==================== */
|
||||||
strong {
|
strong {
|
||||||
color: #3B3B38;
|
color: hsl(var(--foreground));
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 标记高亮 ==================== */
|
/* ==================== 标记高亮 ==================== */
|
||||||
.markup-highlight {
|
.markup-highlight {
|
||||||
background-color: #3B3B3B;
|
background-color: hsl(var(--foreground));
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #FAF9F5;
|
color: var(--md-container-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.markup-underline {
|
.markup-underline {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
text-decoration-color: #E4B1A0;
|
text-decoration-color: var(--md-accent-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 链接 ==================== */
|
/* ==================== 链接 ==================== */
|
||||||
a {
|
a {
|
||||||
color: #D97757;
|
color: var(--md-primary-color);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==================== 表格 ==================== */
|
/* ==================== 表格 ==================== */
|
||||||
th {
|
th {
|
||||||
background: rgba(217, 119, 87, 0.1);
|
background: color-mix(in srgb, var(--md-primary-color) 10%, transparent);
|
||||||
}
|
}
|
||||||
@@ -1,183 +0,0 @@
|
|||||||
/**
|
|
||||||
* MD 红色主题
|
|
||||||
* 传统书法风格,红金配色,宋体排版
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ==================== 容器字体覆盖 ==================== */
|
|
||||||
section,
|
|
||||||
container {
|
|
||||||
font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif CN", STSong, SimSun, serif;
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.8;
|
|
||||||
background-color: rgba(255, 251, 240, 1);
|
|
||||||
border: 4px solid rgba(169, 50, 38, 1);
|
|
||||||
border-radius: 12px;
|
|
||||||
padding: 6px 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#output {
|
|
||||||
font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Source Han Serif CN", STSong, SimSun, serif;
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 一级标题 ==================== */
|
|
||||||
h1 {
|
|
||||||
display: table;
|
|
||||||
padding: 0 1em;
|
|
||||||
border-bottom: 2px solid #A93226;
|
|
||||||
margin: 30px auto 20px;
|
|
||||||
color: #A93226;
|
|
||||||
font-size: 24px;
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 二级标题 ==================== */
|
|
||||||
h2 {
|
|
||||||
display: block;
|
|
||||||
width: fit-content;
|
|
||||||
padding: 6px 20px;
|
|
||||||
margin: 30px auto 20px;
|
|
||||||
color: #FFFFFF;
|
|
||||||
background-color: #A93226;
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 6px;
|
|
||||||
line-height: 1.6em;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 三级标题 ==================== */
|
|
||||||
h3 {
|
|
||||||
padding-left: 8px;
|
|
||||||
border-left: 3px solid #A93226;
|
|
||||||
margin: 20px 8px 10px 0;
|
|
||||||
color: #A93226;
|
|
||||||
font-size: 17px;
|
|
||||||
font-weight: normal;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 四级标题 ==================== */
|
|
||||||
h4 {
|
|
||||||
margin: 10px 8px;
|
|
||||||
color: #D4AC0D;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 五级标题 ==================== */
|
|
||||||
h5 {
|
|
||||||
margin: 10px 8px;
|
|
||||||
color: #797D7F;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 六级标题 ==================== */
|
|
||||||
h6 {
|
|
||||||
margin: 10px 8px;
|
|
||||||
color: #797D7F;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 段落 ==================== */
|
|
||||||
p {
|
|
||||||
margin: 16px 0;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
color: #2C2C2C;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 引用块 ==================== */
|
|
||||||
blockquote {
|
|
||||||
font-style: normal;
|
|
||||||
padding: 15px 12px;
|
|
||||||
border-left: 2px solid rgba(169, 50, 38, 0.8);
|
|
||||||
border-radius: 4px;
|
|
||||||
color: #5D4037;
|
|
||||||
background-color: rgba(253, 237, 236, 1);
|
|
||||||
margin: 12px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote > p {
|
|
||||||
color: #5D4037;
|
|
||||||
font-size: 14px;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 代码块 ==================== */
|
|
||||||
pre.code__pre,
|
|
||||||
.hljs.code__pre {
|
|
||||||
font-size: 13px;
|
|
||||||
border: 1px solid #D4AC0D;
|
|
||||||
box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 图片 ==================== */
|
|
||||||
img {
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #D4AC0D;
|
|
||||||
margin: 20px auto;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 列表 ==================== */
|
|
||||||
ol {
|
|
||||||
padding-left: 1em;
|
|
||||||
margin: 15px 0;
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 0;
|
|
||||||
margin: 15px 0;
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin: 0.2em 0;
|
|
||||||
color: #2C2C2C;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 分隔线 ==================== */
|
|
||||||
hr {
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 2px 0 0;
|
|
||||||
border-color: #D4AC0D;
|
|
||||||
margin: 40px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 强调 ==================== */
|
|
||||||
strong {
|
|
||||||
color: #A93226;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 标记高亮 ==================== */
|
|
||||||
.markup-highlight {
|
|
||||||
background-color: #FADBD8;
|
|
||||||
padding: 5px;
|
|
||||||
color: #A93226;
|
|
||||||
}
|
|
||||||
|
|
||||||
.markup-underline {
|
|
||||||
text-decoration: underline;
|
|
||||||
text-decoration-color: #D4AC0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 链接 ==================== */
|
|
||||||
a {
|
|
||||||
color: #A93226;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==================== 表格 ==================== */
|
|
||||||
th {
|
|
||||||
background: rgba(169, 50, 38, 0.1);
|
|
||||||
}
|
|
||||||
@@ -48,7 +48,7 @@ test -f "$HOME/.baoyu-skills/baoyu-post-to-wechat/EXTEND.md" && echo "user"
|
|||||||
│ Not found │ Run first-time setup ([references/config/first-time-setup.md](references/config/first-time-setup.md)) → Save → Continue │
|
│ Not found │ Run first-time setup ([references/config/first-time-setup.md](references/config/first-time-setup.md)) → Save → Continue │
|
||||||
└───────────┴───────────────────────────────────────────────────────────────────────────┘
|
└───────────┴───────────────────────────────────────────────────────────────────────────┘
|
||||||
|
|
||||||
**EXTEND.md Supports**: Default theme | Default publishing method (api/browser) | Default author | Default open-comment switch | Default fans-only-comment switch | Chrome profile path
|
**EXTEND.md Supports**: Default theme | Default color | Default publishing method (api/browser) | Default author | Default open-comment switch | Default fans-only-comment switch | Chrome profile path
|
||||||
|
|
||||||
First-time setup: [references/config/first-time-setup.md](references/config/first-time-setup.md)
|
First-time setup: [references/config/first-time-setup.md](references/config/first-time-setup.md)
|
||||||
|
|
||||||
@@ -64,6 +64,7 @@ First-time setup: [references/config/first-time-setup.md](references/config/firs
|
|||||||
|
|
||||||
```md
|
```md
|
||||||
default_theme: default
|
default_theme: default
|
||||||
|
default_color: blue
|
||||||
default_publish_method: api
|
default_publish_method: api
|
||||||
default_author: 宝玉
|
default_author: 宝玉
|
||||||
need_open_comment: 1
|
need_open_comment: 1
|
||||||
@@ -71,6 +72,10 @@ only_fans_can_comment: 0
|
|||||||
chrome_profile_path: /path/to/chrome/profile
|
chrome_profile_path: /path/to/chrome/profile
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Theme options**: default, grace, simple, modern
|
||||||
|
|
||||||
|
**Color presets**: blue, green, vermilion, yellow, purple, sky, rose, olive, black, gray, pink, red, orange (or hex value)
|
||||||
|
|
||||||
**Value priority**:
|
**Value priority**:
|
||||||
1. CLI arguments
|
1. CLI arguments
|
||||||
2. Frontmatter
|
2. Frontmatter
|
||||||
@@ -134,6 +139,8 @@ Check and load EXTEND.md settings (see Preferences section above).
|
|||||||
**CRITICAL**: If not found, complete first-time setup BEFORE any other steps or questions.
|
**CRITICAL**: If not found, complete first-time setup BEFORE any other steps or questions.
|
||||||
|
|
||||||
Resolve and store these defaults for later steps:
|
Resolve and store these defaults for later steps:
|
||||||
|
- `default_theme` (default `default`)
|
||||||
|
- `default_color` (omit if not set — theme default applies)
|
||||||
- `default_author`
|
- `default_author`
|
||||||
- `need_open_comment` (default `1`)
|
- `need_open_comment` (default `1`)
|
||||||
- `only_fans_can_comment` (default `0`)
|
- `only_fans_can_comment` (default `0`)
|
||||||
@@ -201,13 +208,18 @@ B) Continue - provide HTML file manually
|
|||||||
- EXTEND.md `default_theme` (loaded in Step 0)
|
- EXTEND.md `default_theme` (loaded in Step 0)
|
||||||
- Fallback: `default`
|
- Fallback: `default`
|
||||||
|
|
||||||
2. **Execute conversion** (using the discovered skill), **always pass `--theme`**:
|
2. **Resolve color** (first match wins):
|
||||||
|
- CLI `--color` argument
|
||||||
|
- EXTEND.md `default_color` (loaded in Step 0)
|
||||||
|
- Omit if not set (theme default applies)
|
||||||
|
|
||||||
|
3. **Execute conversion** (using the discovered skill), **always pass `--theme`**:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx -y bun ${MD_TO_HTML_SKILL_DIR}/scripts/main.ts <markdown_file> --theme <theme>
|
npx -y bun ${MD_TO_HTML_SKILL_DIR}/scripts/main.ts <markdown_file> --theme <theme> [--color <color>]
|
||||||
```
|
```
|
||||||
|
|
||||||
**CRITICAL**: Always include `--theme` parameter. Never omit it, even if using `default`.
|
**CRITICAL**: Always include `--theme` parameter. Never omit it, even if using `default`. Only include `--color` if explicitly set by user or EXTEND.md.
|
||||||
|
|
||||||
3. **Parse JSON output** to get: `htmlPath`, `title`, `author`, `summary`, `contentImages`
|
3. **Parse JSON output** to get: `htmlPath`, `title`, `author`, `summary`, `contentImages`
|
||||||
|
|
||||||
@@ -307,7 +319,7 @@ WeChat Publishing Complete!
|
|||||||
|
|
||||||
Input: [type] - [path]
|
Input: [type] - [path]
|
||||||
Method: API
|
Method: API
|
||||||
Theme: [theme name]
|
Theme: [theme name] [color if set]
|
||||||
|
|
||||||
Article:
|
Article:
|
||||||
• Title: [title]
|
• Title: [title]
|
||||||
@@ -334,7 +346,7 @@ WeChat Publishing Complete!
|
|||||||
|
|
||||||
Input: [type] - [path]
|
Input: [type] - [path]
|
||||||
Method: Browser
|
Method: Browser
|
||||||
Theme: [theme name]
|
Theme: [theme name] [color if set]
|
||||||
|
|
||||||
Article:
|
Article:
|
||||||
• Title: [title]
|
• Title: [title]
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ npx -y bun ./scripts/wechat-article.ts --markdown article.md --author "作者名
|
|||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
|-----------|-------------|
|
|-----------|-------------|
|
||||||
| `--markdown <path>` | Markdown file to convert and post |
|
| `--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) |
|
| `--title <text>` | Override title (auto-extracted from markdown) |
|
||||||
| `--author <name>` | Author name (default: 宝玉) |
|
| `--author <name>` | Author name |
|
||||||
| `--summary <text>` | Article summary |
|
| `--summary <text>` | Article summary |
|
||||||
| `--html <path>` | Pre-rendered HTML file (alternative to markdown) |
|
| `--html <path>` | Pre-rendered HTML file (alternative to markdown) |
|
||||||
| `--profile <dir>` | Chrome profile directory |
|
| `--profile <dir>` | Chrome profile directory |
|
||||||
|
|||||||
@@ -49,14 +49,34 @@ header: "Theme"
|
|||||||
question: "Default theme for article conversion?"
|
question: "Default theme for article conversion?"
|
||||||
options:
|
options:
|
||||||
- label: "default (Recommended)"
|
- 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"
|
- label: "grace"
|
||||||
description: "Elegant - text shadows, rounded cards, refined blockquotes"
|
description: "Elegant - text shadows, rounded cards, refined blockquotes (default: purple)"
|
||||||
- label: "simple"
|
- 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
|
```yaml
|
||||||
header: "Method"
|
header: "Method"
|
||||||
@@ -68,7 +88,7 @@ options:
|
|||||||
description: "Slow, requires Chrome and login session"
|
description: "Slow, requires Chrome and login session"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Question 3: Default Author
|
### Question 4: Default Author
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
header: "Author"
|
header: "Author"
|
||||||
@@ -80,7 +100,7 @@ options:
|
|||||||
|
|
||||||
Note: User will likely choose "Other" to type their author name.
|
Note: User will likely choose "Other" to type their author name.
|
||||||
|
|
||||||
### Question 4: Open Comments
|
### Question 5: Open Comments
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
header: "Comments"
|
header: "Comments"
|
||||||
@@ -92,7 +112,7 @@ options:
|
|||||||
description: "Disable comments by default"
|
description: "Disable comments by default"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Question 5: Fans-Only Comments
|
### Question 6: Fans-Only Comments
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
header: "Fans only"
|
header: "Fans only"
|
||||||
@@ -104,7 +124,7 @@ options:
|
|||||||
description: "Only followers can comment"
|
description: "Only followers can comment"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Question 6: Save Location
|
### Question 7: Save Location
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
header: "Save"
|
header: "Save"
|
||||||
@@ -133,7 +153,8 @@ options:
|
|||||||
## EXTEND.md Template
|
## EXTEND.md Template
|
||||||
|
|
||||||
```md
|
```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_publish_method: [api/browser]
|
||||||
default_author: [author name or empty]
|
default_author: [author name or empty]
|
||||||
need_open_comment: [1/0]
|
need_open_comment: [1/0]
|
||||||
|
|||||||
@@ -673,8 +673,8 @@ Options:
|
|||||||
--content <text> Article content (use with --image)
|
--content <text> Article content (use with --image)
|
||||||
--html <path> HTML file to paste (alternative to --content)
|
--html <path> HTML file to paste (alternative to --content)
|
||||||
--markdown <path> Markdown file to convert and post (recommended)
|
--markdown <path> Markdown file to convert and post (recommended)
|
||||||
--theme <name> Theme for markdown (default, grace, simple)
|
--theme <name> Theme for markdown (default, grace, simple, modern)
|
||||||
--author <name> Author name (default: 宝玉)
|
--author <name> Author name
|
||||||
--summary <text> Article summary
|
--summary <text> Article summary
|
||||||
--image <path> Content image, can repeat (only with --content)
|
--image <path> Content image, can repeat (only with --content)
|
||||||
--submit Save as draft
|
--submit Save as draft
|
||||||
|
|||||||
Reference in New Issue
Block a user