Operational reference for common tasks in tutorial-git.
- Open the chapter file in
chapters/ - Follow the structure defined in
CLAUDE.md(overview, sections, exercises, quiz) - Use American English, capitalise Git in prose
- Preview with any Markdown renderer — the content is SSG-agnostic
- Create
chapters/NN-slug.mdwith frontmatter:--- title: "Chapter Title" section: "slug" order: NN ---
- Add
## Overviewas the first section - Add
## Exercisesand## Quizat the end - Update
CLAUDE.mdproject structure if the chapter list changed - Update cross-references in other chapters if needed
- Place exercises at the end of the chapter under
## Exercises - Each exercise has: Task, Steps (numbered), Verify
- Exercises within a chapter use the same lab repository
- Cross-topic recipes go in
chapters/recipes/
- Place under
## Quizat the end of the chapter - Format:
**Q1.** Question textfollowed by- A)through- D) - Vary correct answer positions across questions
- Add answers at the bottom under
### Answers
- Open draw.io desktop
- Follow the figure style rules in
CLAUDE.md(palettes, arrows, components) - Save as
assets/drawio/git-<topic>-<variant>.drawio - Use readable IDs:
card-commit-1,pill-main,arrow-3-2
CLI (recommended for batch export):
DRAWIO="/c/Program Files/draw.io/draw.io.exe"
"$DRAWIO" --export --format png --scale 2 --transparent \
--output assets/images/<name>.png assets/drawio/<name>.drawioManual (single diagram):
- Open the
.drawiofile in draw.io - File → Export as → PNG
- Settings: transparent background, 2x scale
- Save to
assets/images/— use the same base name as the drawio file
- Edit the
.drawiosource file - Re-export as PNG (section 2.2)
- If the old image is being replaced with a different design, move the
old PNG to
assets/archive/before overwriting
Use Palette C (convention-based) from CLAUDE.md:
- Gray — regular commits
- Blue — main branch
- Green — feature branches
- Purple — merge commits
- Yellow — tags
cd astro-site
npm run dev # http://localhost:4321/tutorial-git/Chapters in chapters/ are the single source for the Astro site. No
manual sync is needed. Cross-references use NN-slug.md format; the
remark plugin in astro-site/src/plugins/remark-rewrite-links.ts
rewrites them to Astro-compatible paths at build time.
cd astro-site
npm run build # output in dist/
npm run preview # preview the production buildPush to main — GitHub Actions builds and deploys to GitHub Pages
automatically. The CI creates the assets symlink before building.
git switch main && git pull
git switch -c docs/chapter-name
# ... make changes ...
git add chapters/NN-slug.md
git commit -m "docs: description of change"
git push -u origin docs/chapter-name- PR title: concise, under 70 characters
- One chapter per PR when possible
- Verify content renders correctly before merging
git switch main && git pull
git branch -d docs/chapter-name
git push origin --delete docs/chapter-namecd docs/solid-ai-templates
git checkout main && git pull
cd ../..
git add docs/solid-ai-templates
git commit -m "chore: update solid-ai-templates submodule"