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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user