3ac00a588a
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2.6 KiB
2.6 KiB
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/
<deck-name>/
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/<deck-name>/ with the landing page at dist/index.html.
Adding a New Deck
- Create directory:
decks/<name>/ - Add
decks/<name>/slides.mdwith frontmatter - Optionally add
pages/andpublic/subdirectories - Register in
index.htmldecks array - Add
dev:<name>andbuild:<name>scripts topackage.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
pnpm run dev # Dev server for demo deck (http://localhost:3030)
pnpm run dev:<deck> # Dev server for a specific deck
pnpm run build # Build all decks → dist/
pnpm run build:<deck> # 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 devorpnpm run dev:<deck> - 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
mainbranch - Runner: self-hosted Gitea Act Runner (label:
aliyun), Docker mode with/var/run/docker.sockmounted - 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
/<deck-name>/