Improve SEO and social card wiring

Add SearchAction and optional Product JSON-LD, per-page OG images/alts, and document the og build and cache headers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
michilis
2026-08-21 02:17:35 +02:00
co-authored by Cursor
parent 6f17b572b1
commit 1c5df18e81
10 changed files with 120 additions and 60 deletions
+9 -3
View File
@@ -57,14 +57,20 @@ interface Props {
schema?: SchemaNode[];
/**
* Social card. A site-relative path, resolved to the absolute URL `og:image` requires.
* Defaults to the shared 1200x630 card.
* Defaults to the shared 1200x630 card that `pnpm og` generates.
*/
image?: string;
/**
* Alt text for the card. Mint pages pass their own ("{name}: 4.9 stars from 54
* reviews…"); everything else gets the sitewide line, matching the default card.
*/
imageAlt?: string;
}
const {
title, description, current, mintCount, ogType = 'website',
noindex = false, offGraph = false, schema = [], image = OG_IMAGE,
imageAlt,
} = Astro.props;
/*
@@ -217,7 +223,7 @@ const noscriptMotion =
<meta property="og:image" content={imageUrl} />
<meta property="og:image:width" content={String(OG_IMAGE_WIDTH)} />
<meta property="og:image:height" content={String(OG_IMAGE_HEIGHT)} />
<meta property="og:image:alt" content={t('seo.ogImageAlt')} />
<meta property="og:image:alt" content={imageAlt ?? t('seo.ogImageAlt')} />
{/*
`summary_large_image`, now that there is an image worth the space. With no
@@ -227,7 +233,7 @@ const noscriptMotion =
<meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} />
<meta name="twitter:image" content={imageUrl} />
<meta name="twitter:image:alt" content={t('seo.ogImageAlt')} />
<meta name="twitter:image:alt" content={imageAlt ?? t('seo.ogImageAlt')} />
{/*
Two faces, and only two: Inter 400 is every paragraph on the site and Space