registri dei piani in git (AI-OS#309)
Refs gitea:Adriano/AI-OS#310 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
### Task 16: SEO, favicon, robots e smoke test finale
|
||||
|
||||
**Files:**
|
||||
- Create: `public/robots.txt`, `public/favicon.svg`, `scripts/smoke.sh`
|
||||
|
||||
**Interfaces:**
|
||||
- Consumes: tutto il sito.
|
||||
|
||||
- [ ] **Step 1: robots e favicon**
|
||||
|
||||
`public/robots.txt`:
|
||||
```
|
||||
User-agent: *
|
||||
Disallow: /admin
|
||||
Disallow: /api
|
||||
Sitemap: https://insanitylab.tielogic.xyz/sitemap-index.xml
|
||||
```
|
||||
|
||||
`public/favicon.svg` — battito/onda del logo InsanityLab su fondo scuro (ricava la forma dal logo estratto; in mancanza):
|
||||
```svg
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<rect width="32" height="32" rx="6" fill="#3a2d26"/>
|
||||
<path d="M4 18h5l3-8 4 12 3-6h9" fill="none" stroke="#b5a48b" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
```
|
||||
|
||||
- [ ] **Step 2: smoke test**
|
||||
|
||||
`scripts/smoke.sh`:
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
npm run build
|
||||
PORT=4399 node --env-file=.env ./dist/server/entry.mjs & SRV=$!
|
||||
trap 'kill $SRV' EXIT
|
||||
sleep 2
|
||||
fail=0
|
||||
for path in / /about /training /programs /programs/performance-class /programs/rehab /blog /contact /admin/login /robots.txt; do
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' "http://localhost:4399$path")
|
||||
echo "$code $path"
|
||||
[ "$code" = "200" ] || fail=1
|
||||
done
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:4399/admin)
|
||||
echo "$code /admin (atteso 302)"
|
||||
[ "$code" = "302" ] || fail=1
|
||||
exit $fail
|
||||
```
|
||||
|
||||
Run: `chmod +x scripts/smoke.sh && ./scripts/smoke.sh`
|
||||
Expected: tutti `200`, `/admin` `302`, exit 0. (Il server standalone usa `PORT`; se la porta è occupata cambiala.)
|
||||
|
||||
- [ ] **Step 3: controllo qualità finale**
|
||||
|
||||
- `npm test` → tutti verdi.
|
||||
- `npx astro check` → nessun errore.
|
||||
- Lighthouse rapido (facoltativo): `npx lighthouse http://localhost:4399/ --quiet --chrome-flags='--headless'` — performance e SEO ≥ 90 attesi su pagine statiche.
|
||||
|
||||
- [ ] **Step 4: commit**
|
||||
|
||||
```bash
|
||||
git add -A && git commit -m "chore: robots, favicon e smoke test"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user