Loading...
Loading...
Generate VitePress documentation sites for source code learning and analysis. Use when creating tutorials that explain how a codebase is implemented internally.
npx skill4agent add howell5/willhong-skills vitepress-tutorial/vitepress-tutorial [task-description]/vitepress-tutorial 帮我解析这个仓库的架构/vitepress-tutorial explain the agent system in detailpackage.json.vitepress/config.tspnpm-workspace.yamlpnpm installQuestion 1: "Where should I create the VitePress tutorial site?"
Options:
- "./docs" (project docs folder)
- "./tutorials/{project-name}" (dedicated tutorials folder)
- Custom path...
Question 2: "What language(s) should the tutorial content be written in? (Max 2)"
multiSelect: true
Options:
- "中文 (Chinese)" - Content in Chinese, code comments in English
- "English" - Content and code comments in English
- "日本語 (Japanese)" - Content in Japanese, code comments in English
- "한국어 (Korean)" - Content in Korean, code comments in Englishdocs/lang//{locale-code}/locales.vitepress/config.tszh-CNen-USjako# Independent workspace - prevents inheriting parent config
packages: []{
"name": "{tutorial-name}",
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vitepress dev docs",
"build": "vitepress build docs",
"preview": "vitepress preview docs"
},
"devDependencies": {
"mermaid": "^11.4.0",
"vitepress": "^1.6.3",
"vitepress-plugin-mermaid": "^2.0.17"
},
"pnpm": {
"onlyBuiltDependencies": ["esbuild"]
}
}import { defineConfig } from 'vitepress'
import { withMermaid } from 'vitepress-plugin-mermaid'
export default withMermaid(defineConfig({
// CRITICAL: Fix Mermaid's dayjs ESM compatibility issue
vite: {
optimizeDeps: {
include: ['mermaid', 'dayjs']
}
},
// ... rest of config
mermaid: {
theme: 'default'
}
}))vite.optimizeDepscd {output-path} && pnpm install{output-path}/
├── package.json # With mermaid plugin
├── pnpm-workspace.yaml # If inside another workspace
├── README.md
└── docs/
├── .vitepress/
│ └── config.ts # With withMermaid wrapper
├── index.md # Homepage
├── introduction/
│ ├── overview.md # Project overview
│ └── architecture.md # Architecture diagram
└── {modules}/ # One directory per module
├── index.md
└── {topics}.md{output-path}/
├── package.json
├── pnpm-workspace.yaml
├── README.md
└── docs/
├── .vitepress/
│ └── config.ts # With locales config + withMermaid
├── index.md # Default locale homepage
├── introduction/ # Default locale content
│ ├── overview.md
│ └── architecture.md
├── {modules}/
│ ├── index.md
│ └── {topics}.md
└── {locale}/ # e.g. "en" or "zh"
├── index.md # Second locale homepage
├── introduction/
│ ├── overview.md
│ └── architecture.md
└── {modules}/
├── index.md
└── {topics}.mdSource: path/to/file.go:123