feat(sync): add landing site synchronization system
- Add scripts/check-landing-sync.sh verifying 4 metrics: - Version (VERSION vs landing index.html) - Templates count (find examples/ vs landing badges) - Quiz questions (questions.json vs index.html + quiz.html) - Guide lines (with ±500 tolerance) - Update CLAUDE.md with sync documentation and expected output - Fix templates count: 87 → 49 in README.md badges and text Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
373b0c7ed1
commit
15475197ab
5 changed files with 254 additions and 4 deletions
25
CHANGELOG.md
25
CHANGELOG.md
|
|
@ -6,6 +6,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
---
|
||||
|
||||
## [3.8.2] - 2026-01-17
|
||||
|
||||
### Added
|
||||
|
||||
- **Landing Site Synchronization System**
|
||||
- New script `scripts/check-landing-sync.sh` verifying 4 metrics:
|
||||
- Version (`VERSION` vs landing index.html)
|
||||
- Templates count (`find examples/` vs landing badges)
|
||||
- Quiz questions (`questions.json` vs index.html + quiz.html)
|
||||
- Guide lines (with ±500 tolerance)
|
||||
- CLAUDE.md updated with sync documentation and expected output
|
||||
- Landing site CLAUDE.md created with sync workflow and line numbers
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Templates count corrected**: 87 → 49 in README.md badges and text
|
||||
- Badge count was wrong since original creation
|
||||
- Actual count verified with `find examples/ -type f`
|
||||
|
||||
---
|
||||
|
||||
## [3.8.1] - 2026-01-16
|
||||
|
||||
### Added
|
||||
|
||||
- **PDF Generation documentation**
|
||||
|
|
|
|||
75
CLAUDE.md
75
CLAUDE.md
|
|
@ -86,6 +86,81 @@ echo "3.7.0" > VERSION && ./scripts/sync-version.sh
|
|||
|
||||
Check `IDEAS.md` for planned improvements and `CHANGELOG.md [Unreleased]` for work in progress.
|
||||
|
||||
## Landing Site Synchronization
|
||||
|
||||
**Important**: Ce guide a un site landing associé qui doit être mis à jour après certains changements.
|
||||
|
||||
**Landing repo**: `/Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide-landing/`
|
||||
|
||||
### Éléments à synchroniser
|
||||
|
||||
| Élément | Source (guide) | Destination (landing) |
|
||||
|---------|----------------|----------------------|
|
||||
| Version | `VERSION` | index.html footer + FAQ |
|
||||
| Templates count | Count `examples/` files | Badges, title, meta tags |
|
||||
| Guide lines | `wc -l guide/ultimate-guide.md` | Badges |
|
||||
| Golden Rules | README.md | index.html section |
|
||||
| FAQ | README.md | index.html FAQ |
|
||||
|
||||
### Triggers de sync
|
||||
|
||||
Après ces modifications, **rappeler** de mettre à jour le landing:
|
||||
|
||||
1. **Version bump** → Modifier `VERSION` ici, puis landing
|
||||
2. **Ajout/suppression templates** → Recalculer count, mettre à jour landing
|
||||
3. **Modification Golden Rules ou FAQ** → Répercuter sur landing
|
||||
4. **Changement significatif du guide** (>100 lignes)
|
||||
|
||||
### Commande de vérification
|
||||
|
||||
```bash
|
||||
./scripts/check-landing-sync.sh
|
||||
```
|
||||
|
||||
**Ce que fait le script (4 vérifications):**
|
||||
|
||||
| Check | Source | Comparaison |
|
||||
|-------|--------|-------------|
|
||||
| Version | `VERSION` | index.html (footer + FAQ) |
|
||||
| Templates | `find examples/` | index.html + examples.html |
|
||||
| Quiz questions | `questions.json` | index.html + quiz.html |
|
||||
| Guide lines | `wc -l ultimate-guide.md` | index.html (tolérance ±500) |
|
||||
|
||||
**Output attendu (si synchronisé):**
|
||||
```
|
||||
=== Landing Site Sync Check ===
|
||||
|
||||
1. Version
|
||||
Guide: 3.8.1
|
||||
Landing: 3.8.1
|
||||
OK
|
||||
|
||||
2. Templates Count
|
||||
Guide: 49 files
|
||||
index.html: 49
|
||||
examples.html: 49
|
||||
OK
|
||||
|
||||
3. Quiz Questions
|
||||
questions.json: 159
|
||||
index.html: 159
|
||||
quiz.html: 159
|
||||
OK
|
||||
|
||||
4. Guide Lines
|
||||
Actual: 9637
|
||||
Landing: 9600+ (approximate)
|
||||
OK (within tolerance)
|
||||
|
||||
=== Summary ===
|
||||
All synced!
|
||||
```
|
||||
|
||||
**En cas de mismatch:**
|
||||
- Le script indique quel fichier est désynchronisé
|
||||
- Exit code = nombre d'issues trouvées
|
||||
- Consulter `landing/CLAUDE.md` pour les numéros de ligne exacts à modifier
|
||||
|
||||
## Research Resources
|
||||
|
||||
**Perplexity Pro disponible**: Pour toute recherche nécessitant des sources fiables ou des informations récentes sur Claude Code, Anthropic, ou les pratiques de développement assisté par IA:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<p align="center">
|
||||
<a href="https://github.com/FlorianBruniaux/claude-code-ultimate-guide/stargazers"><img src="https://img.shields.io/github/stars/FlorianBruniaux/claude-code-ultimate-guide?style=for-the-badge" alt="Stars"/></a>
|
||||
<a href="#"><img src="https://img.shields.io/badge/Lines-9,600+-blueviolet?style=for-the-badge" alt="Lines"/></a>
|
||||
<a href="./examples/"><img src="https://img.shields.io/badge/Templates-87-green?style=for-the-badge" alt="Templates"/></a>
|
||||
<a href="./examples/"><img src="https://img.shields.io/badge/Templates-49-green?style=for-the-badge" alt="Templates"/></a>
|
||||
<a href="./quiz/"><img src="https://img.shields.io/badge/Quiz-159_questions-orange?style=for-the-badge" alt="Quiz"/></a>
|
||||
</p>
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ Claude asks 2-4 questions then guides you through personalized content based on
|
|||
- You read official docs → dense, no progression
|
||||
- You search tutorials → scattered, outdated in weeks
|
||||
|
||||
**This guide:** Structured learning path with 87 copy-paste templates. Your mileage may vary—but this saves you the exploration time.
|
||||
**This guide:** Structured learning path with 49 copy-paste templates. Your mileage may vary—but this saves you the exploration time.
|
||||
|
||||
| Traditional Docs | This Guide |
|
||||
|------------------|------------|
|
||||
|
|
@ -667,7 +667,7 @@ Get notified about major updates, new templates, and Claude Code best practices:
|
|||
|
||||
---
|
||||
|
||||
*Version 3.8.1 | January 2026 | Crafted with Claude*
|
||||
*Version 3.8.2 | January 2026 | Crafted with Claude*
|
||||
|
||||
<!-- SEO Keywords -->
|
||||
<!-- claude code, claude code tutorial, anthropic cli, ai coding assistant, claude code mcp,
|
||||
|
|
|
|||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
|||
3.8.1
|
||||
3.8.2
|
||||
|
|
|
|||
150
scripts/check-landing-sync.sh
Executable file
150
scripts/check-landing-sync.sh
Executable file
|
|
@ -0,0 +1,150 @@
|
|||
#!/bin/bash
|
||||
# Check if landing site is in sync with guide
|
||||
# Usage: ./scripts/check-landing-sync.sh
|
||||
#
|
||||
# Verifies: Version, Templates count, Quiz questions, Guide lines
|
||||
|
||||
set -e
|
||||
|
||||
GUIDE_DIR="/Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide"
|
||||
LANDING_DIR="/Users/florianbruniaux/Sites/perso/claude-code-ultimate-guide-landing"
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo "=== Landing Site Sync Check ==="
|
||||
echo ""
|
||||
|
||||
ISSUES=0
|
||||
|
||||
# Check if landing dir exists
|
||||
if [ ! -d "$LANDING_DIR" ]; then
|
||||
echo -e "${RED}ERROR: Landing directory not found at $LANDING_DIR${NC}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ===================
|
||||
# 1. VERSION CHECK
|
||||
# ===================
|
||||
GUIDE_VERSION=$(cat "$GUIDE_DIR/VERSION" | tr -d '\n')
|
||||
LANDING_VERSION=$(grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' "$LANDING_DIR/index.html" | head -1 | sed 's/v//')
|
||||
|
||||
echo -e "${BLUE}1. Version${NC}"
|
||||
echo " Guide: $GUIDE_VERSION"
|
||||
echo " Landing: $LANDING_VERSION"
|
||||
if [ "$GUIDE_VERSION" != "$LANDING_VERSION" ]; then
|
||||
echo -e " ${RED}MISMATCH${NC} → Update index.html (footer + FAQ)"
|
||||
ISSUES=$((ISSUES + 1))
|
||||
else
|
||||
echo -e " ${GREEN}OK${NC}"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# ===================
|
||||
# 2. TEMPLATES COUNT
|
||||
# ===================
|
||||
TEMPLATE_COUNT=$(find "$GUIDE_DIR/examples" -type f \( -name "*.md" -o -name "*.sh" -o -name "*.ps1" -o -name "*.yml" -o -name "*.yaml" \) | wc -l | tr -d ' ')
|
||||
|
||||
# Check index.html
|
||||
LANDING_TEMPLATES_INDEX=$(grep -oE '[0-9]+ Templates' "$LANDING_DIR/index.html" | head -1 | grep -oE '[0-9]+')
|
||||
# Check examples.html
|
||||
LANDING_TEMPLATES_EXAMPLES=$(grep -oE '[0-9]+ Templates' "$LANDING_DIR/examples.html" | head -1 | grep -oE '[0-9]+')
|
||||
|
||||
echo -e "${BLUE}2. Templates Count${NC}"
|
||||
echo " Guide: $TEMPLATE_COUNT files"
|
||||
echo " index.html: $LANDING_TEMPLATES_INDEX"
|
||||
echo " examples.html: $LANDING_TEMPLATES_EXAMPLES"
|
||||
|
||||
TEMPLATES_OK=true
|
||||
if [ "$TEMPLATE_COUNT" != "$LANDING_TEMPLATES_INDEX" ]; then
|
||||
echo -e " ${YELLOW}MISMATCH in index.html${NC}"
|
||||
TEMPLATES_OK=false
|
||||
fi
|
||||
if [ "$TEMPLATE_COUNT" != "$LANDING_TEMPLATES_EXAMPLES" ]; then
|
||||
echo -e " ${YELLOW}MISMATCH in examples.html${NC}"
|
||||
TEMPLATES_OK=false
|
||||
fi
|
||||
if [ "$TEMPLATES_OK" = true ]; then
|
||||
echo -e " ${GREEN}OK${NC}"
|
||||
else
|
||||
ISSUES=$((ISSUES + 1))
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# ===================
|
||||
# 3. QUIZ QUESTIONS
|
||||
# ===================
|
||||
# questions.json is in the landing repo (source of truth for quiz)
|
||||
# Question IDs have format "XX-XXX" (e.g., "01-001"), category IDs are just numbers
|
||||
QUESTIONS_COUNT=$(grep -cE '"id": "[0-9]+-[0-9]+"' "$LANDING_DIR/questions.json")
|
||||
# Alternative with jq if available: jq '.questions | length'
|
||||
|
||||
# Check what landing pages say
|
||||
LANDING_QUESTIONS_INDEX=$(grep -oE '[0-9]+ quiz questions' "$LANDING_DIR/index.html" | head -1 | grep -oE '[0-9]+')
|
||||
LANDING_QUESTIONS_QUIZ=$(grep -oE '[0-9]+ Questions' "$LANDING_DIR/quiz.html" | head -1 | grep -oE '[0-9]+')
|
||||
|
||||
echo -e "${BLUE}3. Quiz Questions${NC}"
|
||||
echo " questions.json: $QUESTIONS_COUNT"
|
||||
echo " index.html: $LANDING_QUESTIONS_INDEX"
|
||||
echo " quiz.html: $LANDING_QUESTIONS_QUIZ"
|
||||
|
||||
QUESTIONS_OK=true
|
||||
if [ "$QUESTIONS_COUNT" != "$LANDING_QUESTIONS_INDEX" ]; then
|
||||
echo -e " ${YELLOW}MISMATCH in index.html${NC}"
|
||||
QUESTIONS_OK=false
|
||||
fi
|
||||
if [ "$QUESTIONS_COUNT" != "$LANDING_QUESTIONS_QUIZ" ]; then
|
||||
echo -e " ${YELLOW}MISMATCH in quiz.html${NC}"
|
||||
QUESTIONS_OK=false
|
||||
fi
|
||||
if [ "$QUESTIONS_OK" = true ]; then
|
||||
echo -e " ${GREEN}OK${NC}"
|
||||
else
|
||||
ISSUES=$((ISSUES + 1))
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# ===================
|
||||
# 4. GUIDE LINES
|
||||
# ===================
|
||||
GUIDE_LINES=$(wc -l < "$GUIDE_DIR/guide/ultimate-guide.md" | tr -d ' ')
|
||||
# Landing shows approximate (e.g., "9,600+")
|
||||
LANDING_LINES=$(grep -oE '[0-9,]+\+ lines' "$LANDING_DIR/index.html" | head -1 | grep -oE '[0-9,]+' | tr -d ',')
|
||||
|
||||
echo -e "${BLUE}4. Guide Lines${NC}"
|
||||
echo " Actual: $GUIDE_LINES"
|
||||
echo " Landing: ${LANDING_LINES}+ (approximate)"
|
||||
|
||||
# Check if landing approximation is reasonable (within 500 lines)
|
||||
LANDING_LINES_NUM=${LANDING_LINES:-0}
|
||||
DIFF=$((GUIDE_LINES - LANDING_LINES_NUM))
|
||||
if [ $DIFF -lt -500 ] || [ $DIFF -gt 1000 ]; then
|
||||
echo -e " ${YELLOW}UPDATE RECOMMENDED${NC} - Significant difference"
|
||||
# Not counting as hard error, just warning
|
||||
else
|
||||
echo -e " ${GREEN}OK${NC} (within tolerance)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# ===================
|
||||
# SUMMARY
|
||||
# ===================
|
||||
echo "=== Summary ==="
|
||||
if [ $ISSUES -eq 0 ]; then
|
||||
echo -e "${GREEN}All synced!${NC}"
|
||||
else
|
||||
echo -e "${RED}$ISSUES issue(s) found${NC}"
|
||||
echo ""
|
||||
echo "To fix:"
|
||||
echo " 1. Edit: $LANDING_DIR/index.html"
|
||||
echo " 2. Edit: $LANDING_DIR/examples.html (if templates changed)"
|
||||
echo " 3. Edit: $LANDING_DIR/quiz.html (if questions changed)"
|
||||
echo ""
|
||||
echo "See: $LANDING_DIR/CLAUDE.md for exact line numbers"
|
||||
fi
|
||||
|
||||
exit $ISSUES
|
||||
Loading…
Add table
Add a link
Reference in a new issue