# Slide Project Multi-deck 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 ``` index.html # Landing page (lists all decks) decks/ / slides.md # Slide entry point pages/ # Additional slide files (imported via src: ./pages/xxx.md) public/ # Static assets (images, fonts) scripts/ build.sh # Build all decks .gitea/workflows/ # CI/CD pipeline dist/ # Build output (gitignored) ``` Each deck is an independent Slidev presentation under `decks/`. The build outputs to `dist//` with the landing page at `dist/index.html`. ## Adding a New Deck 1. Create directory: `decks//` 2. Add `decks//slides.md` with frontmatter 3. Optionally add `pages/` and `public/` subdirectories 4. Register in `index.html` decks array 5. Add `dev:` and `build:` scripts to `package.json` ## 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 # Dev server for demo deck (http://localhost:3030) pnpm run dev: # Dev server for a specific deck pnpm run build # Build all decks → dist/ pnpm run build: # Build a single deck pnpm run serve # Build all + serve dist/ on port 3030 (landing page with deck selection) pnpm run export # Export to PDF (requires playwright-chromium) ``` - **dev mode** — hot-reload single deck for editing, use `pnpm run dev` or `pnpm run dev:` - **serve mode** — build all decks and serve the landing page at `http://localhost:3030`, choose which deck to present ## 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 → `pnpm run 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, decks accessible at `//`