本文档使用 AI 翻译
- 创建空分支
git switch --orphan docs- 创建
README.md
cat > README.md <<EOF
# 中文文档
本文档使用 AI 翻译
EOF- 首次提交
git add .
git commit -am init
git push origin docs- 设置上游仓库
# GitHub fork Codespaces 方式已自动设置
git remote add upstream https://github.com/RooCodeInc/Roo-Code-Docs.git
git fetch upstream main
git checkout upstream/main -- docs- 增量翻译
git diff docs/- 本地测试
git clone https://github.com/RooCodeInc/Roo-Code-Docs.git docsite
cp -r docs_zh/* ./docsite/docs/
cd docsite
npm install
npm start
# 构建
npm run build- 安装 CLI 工具 (增量更新直接使用 AI CLI 工具直接对比)
# npm install -g npm
npm install -g @google/gemini-cli
npm install -g @qwen-code/qwen-code- 设置环境变量
.env
API_KEY=
MODEL=
API_URL=https://openrouter.ai/api/v1/chat/completions
ROOT_DIR=./docs
EXCLUDE_DIR=update-notes
OUTPUT_MODE=new_folder- AI 翻译
- Docusaurus (已内置)
npm install
npm run build