diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..f13afc2 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,48 @@ +# Slide Project + +Slidev presentation project. Remote Gitea repo with Docker-based CI/CD auto-deployment. + +## Slidev Skill + +All slide-related operations (create, edit, format, build, export) MUST first invoke the `/slidev` skill and read its references at `~/.claude/skills/slidev/`. + +## Project Structure + +- `slides.md` — main slide entry point +- `pages/` — additional slide files (imported via `src: ./pages/xxx.md`) +- `public/` — static assets (images, fonts) +- `.gitea/workflows/deploy.yaml` — CI/CD pipeline +- `dist/` — build output (gitignored) + +## Git Commit Convention + +Use Conventional Commits (English): + +``` +type: description + +feat: add new slide deck for React hooks +docs: update presenter notes for API talk +fix: correct Mermaid diagram rendering +chore: update Slidev dependencies +``` + +Types: `feat`, `fix`, `docs`, `style`, `refactor`, `chore`, `build`, `ci` + +After completing slide edits, auto-commit with a descriptive message. + +## Key Commands + +```bash +pnpm run dev # Local dev server (http://localhost:3030) +pnpm run build # Build static SPA → dist/ +pnpm run export # Export to PDF (requires playwright-chromium) +``` + +## CI/CD Pipeline + +- **Trigger:** push to `main` branch +- **Runner:** self-hosted Gitea Act Runner (label: `aliyun`), Docker mode with `/var/run/docker.sock` mounted +- **Steps:** checkout → install deps → `slidev build` → deploy dist/ to nginx container +- **Deploy:** CI job spawns a sibling nginx container on the host via the mounted Docker socket (Docker out of Docker, not DinD) +- **Serve:** nginx container exposes port 8080