revive: garden rebranded to Vigo + Estate API dashboard

- Rebrand from Vigilio Desto → Vigo, the Watcher of Trentuna
- Updated hugo.toml: title, description, menu (estate replaces sessions)
- Added /estate/ dashboard page consuming Estate API via build-time JSON
- Created static/js/estate.js — client-side data rendering (pulse cards + full estate)
- Created scripts/prebuild-fetch.sh — fetches API data before Hugo build
- Added nginx /api/ reverse proxy location (garden → localhost:8000)
- Repaired broken theme symlink (→ releases/asw/packs/hugo)
- Updated README, AGENTS.md, .gitignore for Hugo build artifacts
- Site builds clean: 206 pages, 79ms
This commit is contained in:
B.A. Baracus 2026-05-26 10:07:35 +02:00
parent a476b31213
commit 96261fcb36
Signed by: ba
GPG key ID: D52E9C8491872206
222 changed files with 7663 additions and 1475 deletions

45
scripts/prebuild-fetch.sh Executable file
View file

@ -0,0 +1,45 @@
#!/bin/bash
# prebuild-fetch.sh — Fetch Estate API data at build time and save as static JSON
#
# Called before `hugo` to populate static/data/ with API snapshots.
# The estate.js client reads from /data/*.json as the primary source.
#
# Usage: bash scripts/prebuild-fetch.sh
set -euo pipefail
DIR="$(cd "$(dirname "$0")/.." && pwd)"
DATA_DIR="${DIR}/static/data"
API_HOST="${API_HOST:-http://127.0.0.1:8000}"
API_KEY="trentuna-estate-key-2026"
mkdir -p "$DATA_DIR"
ENDPOINTS=(
"summary"
"health"
"disk"
"events?limit=10"
"repos"
"providers"
"builds"
"trends?limit=5"
"state"
)
echo "→ Fetching Estate API data for garden build…"
for ep in "${ENDPOINTS[@]}"; do
filename="$(echo "$ep" | sed 's/[?&=/]/-/g' | sed 's/--*/-/g' | sed 's/^-//')"
url="${API_HOST}/${ep}"
if json=$(curl -sf -H "X-API-Key: ${API_KEY}" "$url" 2>/dev/null); then
echo "$json" > "${DATA_DIR}/${filename}.json"
echo "${ep}${filename}.json ($(echo "$json" | wc -c) bytes)"
else
echo "${ep} — API unreachable"
echo '{"error":true,"message":"API unavailable at build time"}' > "${DATA_DIR}/${filename}.json"
fi
done
echo "→ Done. ${#ENDPOINTS[@]} endpoints cached."