2
0
mirror of https://github.com/acepanel/acepanel.github.io.git synced 2026-02-04 15:20:58 +08:00
Files
acepanel.github.io/CLAUDE.md
2026-01-25 23:38:11 +08:00

58 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 项目概述
这是 AcePanel服务器运维管理面板的官方文档网站使用 VitePress 构建,支持多语言(简体中文、繁体中文、英文)。
## 常用命令
```bash
# 安装依赖
pnpm install
# 启动开发服务器
pnpm dev
# 构建生产版本
pnpm build
# 预览构建结果
pnpm preview
```
## 项目架构
### 目录结构
- `en/` - 英文文档源语言Crowdin 翻译源)
- `zh_CN/` - 简体中文文档
- `zh_TW/` - 繁体中文文档
- `.vitepress/config/` - VitePress 配置
- `index.ts` - 主配置入口,定义多语言 locales
- `shared.ts` - 共享配置markdown 插件、主题配置等)
- `en.ts` / `zh_CN.ts` / `zh_TW.ts` - 各语言独立配置(导航、侧边栏)
- `.vitepress/theme/` - 自定义主题扩展
- `public/` - 静态资源
### 多语言机制
- 简体中文 (`zh_CN`) 是根路由,通过 `rewrites` 配置映射到根路径
- 英文和繁体中文分别在 `/en/``/zh_TW/` 路径下
- 使用 Crowdin 进行翻译管理,英文为源语言
### 版本历史
版本数据从 `https://api.acepanel.net/versions` API 动态获取,在配置文件构建时拉取最新 10 个版本。
### 使用的 VitePress 插件
- `@shikijs/vitepress-twoslash` - TypeScript 代码悬浮提示
- `vitepress-plugin-group-icons` - 代码块分组图标
- `vitepress-markdown-timeline` - 时间线组件
## 部署
推送到 `main` 分支会自动触发 GitHub Actions 部署到 GitHub Pages。