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,67 @@
|
||||
# Final Review Fixes — InsanityLab Website
|
||||
|
||||
**Commit**: `6d19637`
|
||||
**Data**: 2026-07-02
|
||||
**Branch**: main
|
||||
|
||||
---
|
||||
|
||||
## IMP-1 — Sitemap espone /admin
|
||||
|
||||
**File**: `astro.config.mjs`
|
||||
**Modifica**: `integrations: [sitemap()]` → `integrations: [sitemap({ filter: (page) => !page.includes('/admin') })]`
|
||||
**Evidenza**: `dist/client/sitemap-0.xml` dopo build contiene solo URL pubblici (`/`, `/about`, `/blog`, `/contact`, `/programs/*`, `/training`). Nessun URL `/admin` presente.
|
||||
|
||||
---
|
||||
|
||||
## IMP-2 — Sidebar programmi con categorie inventate
|
||||
|
||||
**File**: `src/pages/programs/[slug].astro`
|
||||
**Modifica**:
|
||||
- Rimossa costante hardcoded `blogCategories = ['Fitness', 'Salute', 'Stile di vita', 'Nutrizione']`
|
||||
- Aggiunto `import { CATEGORIES } from '../../lib/blog-const'`
|
||||
- Link aggiornati da `href="/blog"` a `href={/blog?categoria=${encodeURIComponent(c)}}`
|
||||
|
||||
**Evidenza**: Le categorie ora provengono da `CATEGORIES` in `blog-const.ts` (`Articoli tecnici & scientifici`, `Contenuti educativi`, `LinkedIn / Insight`, `Eventi & Presidi`) e i link puntano alla pagina blog filtrata per categoria, coerente con `Sidebar.astro`.
|
||||
|
||||
---
|
||||
|
||||
## README — Porta e versione Astro
|
||||
|
||||
**File**: `README.md`
|
||||
**Modifiche**:
|
||||
- `localhost:3000` → `localhost:4321` (porta dev corretta di Astro)
|
||||
- `Astro 5` → `Astro 7` (versione installata: `astro@7.0.5` da `npm ls astro`)
|
||||
|
||||
**Evidenza**: `npm ls astro` → `astro@7.0.5`. Porta 4321 è il default Astro 7.
|
||||
|
||||
---
|
||||
|
||||
## MIN-1 — Soft-404 blog
|
||||
|
||||
**File**: `src/pages/blog/[slug].astro`
|
||||
**Modifica**: `return Astro.redirect('/404')` → `return new Response(null, { status: 404 })`
|
||||
|
||||
**Razionale**: `Astro.rewrite` non presente in `astro@7.0.5` types (grep vuoto). `new Response(null, { status: 404 })` restituisce HTTP 404 reale; il node adapter serve la pagina 404 prerender.
|
||||
**Evidenza**: `curl -I http://localhost:4399/blog/slug-inesistente-xyz` → `HTTP/1.1 404 Not Found`
|
||||
|
||||
---
|
||||
|
||||
## MIN-3 — og:image mancante
|
||||
|
||||
**File aggiunto**: `public/img/og.jpg` (copia di `src/assets/img/hero-1.jpg`)
|
||||
**File modificato**: `src/layouts/Base.astro` — aggiunto `<meta property="og:image" content={new URL('/img/og.jpg', Astro.site)} />` dopo `og:type`
|
||||
**Evidenza**: `curl -s http://localhost:4399/` → HTML contiene `<meta property="og:image" content="https://insanitylab.tielogic.xyz/img/og.jpg">`
|
||||
|
||||
---
|
||||
|
||||
## Verifiche Finali
|
||||
|
||||
| Check | Risultato |
|
||||
|-------|-----------|
|
||||
| `npm test` | 28/28 passed |
|
||||
| `./scripts/smoke.sh` | exit 0 (tutti 200/302 attesi) |
|
||||
| `npx astro check` | 0 errori, 0 warning |
|
||||
| sitemap senza /admin | PASS — nessun URL /admin in sitemap-0.xml |
|
||||
| `curl -I /blog/slug-inesistente` | `404 Not Found` |
|
||||
| `og:image` in HTML `/` | `https://insanitylab.tielogic.xyz/img/og.jpg` presente |
|
||||
Reference in New Issue
Block a user