fix: sitemap senza admin, categorie sidebar reali, 404 blog, og:image e README
- IMP-1: sitemap filter esclude /admin - IMP-2: [slug].astro programmi usa CATEGORIES da blog-const con link /blog?categoria= - MIN-1: blog/[slug].astro ritorna 404 vera invece di redirect - MIN-3: public/img/og.jpg + meta og:image in Base.astro - README: porta 3000→4321, Astro 5→7 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ const { title, description = 'InsanityLab — Performance. Balance. Longevity. A
|
||||
<meta property="og:title" content={`${title} — InsanityLab`} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:image" content={new URL('/img/og.jpg', Astro.site)} />
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
||||
<link rel="sitemap" href="/sitemap-index.xml" />
|
||||
</head>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { getPublishedBySlug } from '../../lib/posts';
|
||||
export const prerender = false;
|
||||
|
||||
const post = getPublishedBySlug(getDb(), Astro.params.slug!);
|
||||
if (!post) return Astro.redirect('/404');
|
||||
if (!post) return new Response(null, { status: 404 });
|
||||
const fmt = new Intl.DateTimeFormat('it-IT', { dateStyle: 'long' });
|
||||
---
|
||||
<Base title={post.title} description={post.excerpt}>
|
||||
|
||||
@@ -3,6 +3,7 @@ import Base from '../../layouts/Base.astro';
|
||||
import PageHero from '../../components/PageHero.astro';
|
||||
import { programs } from '../../data/programs';
|
||||
import { performanceClassPricing } from '../../data/pricing';
|
||||
import { CATEGORIES } from '../../lib/blog-const';
|
||||
export const prerender = true;
|
||||
|
||||
export function getStaticPaths() {
|
||||
@@ -10,7 +11,6 @@ export function getStaticPaths() {
|
||||
}
|
||||
const { program } = Astro.props;
|
||||
const others = programs.filter((p) => p.slug !== program.slug);
|
||||
const blogCategories = ['Fitness', 'Salute', 'Stile di vita', 'Nutrizione'];
|
||||
---
|
||||
<Base title={program.title} description={program.excerpt}>
|
||||
<PageHero title={program.title.toUpperCase()} />
|
||||
@@ -34,7 +34,7 @@ const blogCategories = ['Fitness', 'Salute', 'Stile di vita', 'Nutrizione'];
|
||||
</div>
|
||||
<aside class="prog__side">
|
||||
<h3>Categorie</h3>
|
||||
{blogCategories.map((c) => <p><a href="/blog">{c}</a></p>)}
|
||||
{CATEGORIES.map((c) => <p><a href={`/blog?categoria=${encodeURIComponent(c)}`}>{c}</a></p>)}
|
||||
<h3>Altri programmi</h3>
|
||||
{others.map((o) => <p><a href={`/programs/${o.slug}`}>{o.title}</a></p>)}
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user