Loading...
Loading...
Convert Markdown articles into inline-style HTML compatible with WeChat Official Accounts. It uses the kami paper-style theme by default, and supports switching between multiple themes including kami, magazine-ink, magazine-indigo, magazine-forest, magazine-kraft, magazine-dune, elegant, modern, and minimal, as well as parameter configurations such as font, font size, accent color, background color, and output path. It is used for official account typesetting, article HTML generation, and replacing unstable external typesetting services, and is especially suitable for converting articles in this vault into a format that can be copied to the WeChat Official Account editor.
npx skill4agent add zjp1997720/writing-clone-starter wechat-styler# Basic Usage (Use Default Theme)
/wechat-styler path/to/article.md
# Specify Theme
/wechat-styler path/to/article.md --theme kami
/wechat-styler path/to/article.md --theme magazine-ink
# Batch Conversion (Supports Glob Pattern)
/wechat-styler "articles/*.md" --theme kami
/wechat-styler "01_项目/内容创作/**/*.md" --theme magazine-ink
# Custom Parameters
/wechat-styler path/to/article.md --theme kami --font-size 17 --accent-color "#1B365D"
# Output to Specified Path (Single File)
/wechat-styler path/to/article.md --output path/to/output.html#f5f4ed#1B365Dfont_family_cn: 'Inter','TsangerJinKai02','Source Han Sans SC','Noto Sans CJK SC','PingFang SC','Microsoft YaHei',Arial,sans-serif
font_family_en: 'Newsreader','Source Serif 4','Source Serif Pro','Charter',Georgia,'Times New Roman',serif
font_size: 16
line_height: 1.55
accent_color: '#1B365D'
background_color: '#f5f4ed'
surface_color: '#faf9f5'
text_color: '#141413'
secondary_color: '#5e5d59'
heading_font: 'TsangerJinKai02','Source Han Serif SC','Noto Serif CJK SC','Songti SC','STSong',Georgia,serif
code_font: 'JetBrains Mono','SF Mono','Fira Code',Consolas,Monaco,'TsangerJinKai02','Source Han Serif SC',monospacemagazine-web-pptink / paper / tintrgba()| Theme | Command | Variant | Font / Layout Personality |
|---|---|---|---|
| Ink Classic | | | Sans-serif body text + serif headings, thin rules, dash lists, pull quotes, universal magazine inner pages |
| Indigo Porcelain | | | Inter/SF Pro body text + Source Serif headings, left research bar, note quotes, technical code blocks |
| Forest Ink | | | Regular script/Songti body text + non-fiction headings, centered headings, field note quotes, natural image captions |
| Kraft Paper | | | Songti body text + archive title boxes, archive-style quotes, Roman numeral ordered lists, old paper code boxes |
| Dune | | | Avenir body text + Didot/Bodoni headings, right-aligned gallery headings, gallery quotes, minimalist image captions |
magazine-editorialmagazine_variantbackground-colormargin:0 autofont_family_cn: 'FZShuSong-Z01','Songti SC',STSong,serif
font_family_en: 'Garamond',serif
font_size: 16
line_height: 1.9
accent_color: '#cf4436'
background_color: '#f7f6f1'
heading_font: 'Noto Serif SC','Songti SC',STSong,Georgia,serif
code_font: 'JetBrains Mono','SF Mono',Menlo,Consolas,monospacefont_family_cn: 'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif
font_family_en: 'SF Pro Display','Helvetica Neue',sans-serif
font_size: 16
line_height: 1.8
accent_color: '#007aff'
background_color: '#ffffff'
heading_font: 'PingFang SC','Hiragino Sans GB',sans-serif
code_font: 'SF Mono',Menlo,Consolas,monospacefont_family_cn: 'Noto Sans SC','PingFang SC',sans-serif
font_family_en: 'Inter','Helvetica Neue',sans-serif
font_size: 15
line_height: 2.0
accent_color: '#333333'
background_color: '#fafafa'
heading_font: 'Noto Sans SC',sans-serif
code_font: 'JetBrains Mono',monospace| Preset | Bound Theme | Layout Tone |
|---|---|---|
| | Paper-style document: formal, restrained, ink-blue vertical line on the left of headings |
| | E-magazine family: presents five layouts of classic / research / fieldnote / archive / gallery respectively through |
| | Retro long-form article: centered headings, stretched line height, excerpt-style quotes |
| | Modern tutorial: sans-serif hierarchy, prompt cards, technical code blocks |
| | Minimalist notes: low decoration, large white space, thin-line quotes |
background-color| Parameter | Description | Default Value |
|---|---|---|
| Theme Name | |
| Body Font Size (px) | |
| Line Height | |
| Accent Color (Headings, Links) | |
| Background Color, must use solid hex | |
| Maximum Content Width (px) | |
| Output File Path | Auto-generated |
path/to/article.mdpath/to/article_wechat.html# Generate preview pages for all themes (use default sample article)
node scripts/generate-preview.mjs
# Generate preview with custom article
node scripts/generate-preview.mjs path/to/your-article.md
# Preview only specified themes (comma-separated, no spaces)
node scripts/generate-preview.mjs article.md --themes magazine-ink,magazine-indigo,magazine-forest,magazine-kraft,magazine-dune
# Custom output path
node scripts/generate-preview.mjs article.md --themes kami,elegant --output /path/to/my-preview.htmlpreview.htmlthemes/# themes/my-theme.yaml
name: my-theme
description: My Custom Theme
font_family_cn: 'Custom Font CN'
font_family_en: 'Custom Font EN'
font_size: 16
line_height: 1.8
accent_color: '#ff6b6b'
background_color: '#f8f9fa'
heading_font: 'Heading Font'
code_font: 'Code Font'/wechat-styler article.md --theme my-themetext-align:centermargin:0 auto---
title: Article Title
summary: Article Summary
---
## Section Title
This is a paragraph of body text, including **bold** and `code`.

> This is a quotescripts/convert.mjswechat-styler/
├── SKILL.md
├── scripts/
│ └── convert.mjs
├── themes/
│ ├── elegant.yaml
│ ├── kami.yaml
│ ├── magazine-dune.yaml
│ ├── magazine-forest.yaml
│ ├── magazine-indigo.yaml
│ ├── magazine-ink.yaml
│ ├── magazine-kraft.yaml
│ ├── modern.yaml
│ └── minimal.yaml
└── templates/
└── base.html