garden: port content, rebuild public/, add new scripts and features
- Ported Ludo profile from vault to garden - Added auto-rebuild watcher scripts - Updated static data snapshots - Added garden-features.js and api-garden.json - Added GARDEN-CONTENT-GAPS.md for tracking - Rebuilt Hugo public/ output
This commit is contained in:
parent
8c06ab2836
commit
5703e606d0
222 changed files with 1728 additions and 594 deletions
52
scripts/auto-rebuild.sh
Executable file
52
scripts/auto-rebuild.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# auto-rebuild.sh — Auto-rebuild garden: fetch API data → hugo → checkpoint
|
||||
#
|
||||
# Called by auto-rebuild-watcher.sh when content/ changes.
|
||||
# Also callable manually: bash scripts/auto-rebuild.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$DIR"
|
||||
|
||||
echo "=== Garden auto-rebuild: $(date -u +%Y-%m-%dT%H:%M:%SZ) ==="
|
||||
|
||||
# 1. Fetch Estate API snapshots
|
||||
echo ""
|
||||
bash scripts/prebuild-fetch.sh || echo "⚠️ prebuild-fetch.sh failed, continuing..."
|
||||
|
||||
# 2. Build Hugo site
|
||||
echo ""
|
||||
echo "→ Running hugo..."
|
||||
hugo 2>&1
|
||||
HUGO_EXIT=$?
|
||||
if [ $HUGO_EXIT -ne 0 ]; then
|
||||
echo "✗ Hugo build failed (exit $HUGO_EXIT)"
|
||||
# Still write checkpoint so next agent knows state
|
||||
fi
|
||||
|
||||
# 3. Gather stats for checkpoint
|
||||
PUBLISHED_COUNT=$(find content/ -name '*.md' -not -path '*/_index.md' -not -name '_index.md' | wc -l)
|
||||
PUBLIC_PAGE_COUNT=$(find public/ -name '*.html' | wc -l)
|
||||
NEXT_ACTION="check garden estate dashboard health at next patrol"
|
||||
|
||||
# 4. Write checkpoint
|
||||
CHECKPOINT="$DIR/.garden_checkpoint"
|
||||
cat > "$CHECKPOINT" <<EOF
|
||||
# Garden Checkpoint
|
||||
# Auto-generated by auto-rebuild.sh — do not edit manually
|
||||
|
||||
last_build: $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
last_api_sync: $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
published_pages: $PUBLISHED_COUNT
|
||||
public_html_files: $PUBLIC_PAGE_COUNT
|
||||
hugo_exit_code: $HUGO_EXIT
|
||||
next_action: $NEXT_ACTION
|
||||
EOF
|
||||
|
||||
echo ""
|
||||
echo "✓ Garden rebuilt at $(date -u)"
|
||||
echo " Content pages: $PUBLISHED_COUNT"
|
||||
echo " Public HTML: $PUBLIC_PAGE_COUNT"
|
||||
echo " Hugo exit: $HUGO_EXIT"
|
||||
echo " Checkpoint: $CHECKPOINT"
|
||||
Loading…
Add table
Add a link
Reference in a new issue