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
+15 -2
View File
@@ -17,11 +17,24 @@ export const GITHUB_URL = 'https://github.com/Azzamo-net/cashumints.space';
export const AZZAMO_URL = 'https://azzamo.net';
/**
* The default social card, served from `public/`.
* The default social card: brand, tagline and the network's stats, rendered by
* `pnpm og` into `public/og/` alongside the per-mint cards. Home, the list pages and
* any mint whose own card failed to render all point here.
*
* Relative on purpose: `Base.astro` resolves it against `Astro.site`, because an
* `og:image` that is not absolute is not a weaker signal, it is an ignored one.
* Stable filename, unlike the hashed per-mint cards, so it is served with
* `Cache-Control: max-age=3600` rather than immutable (see README).
*/
export const OG_IMAGE = '/og.png';
export const OG_IMAGE = '/og/default.png';
export const OG_IMAGE_WIDTH = 1200;
export const OG_IMAGE_HEIGHT = 630;
/**
* Whether a rated mint's JSON-LD also carries the review-snippet-eligible `Product`
* type (see `mintServiceNode` in schema.ts for the reasoning). On by default; set
* `SEO_PRODUCT_JSONLD=0` to fall back to the plain `Service` node on the next build.
* An env flag rather than a source edit, so the call can be reversed without a code
* change if Google's treatment of self-collected review markup shifts.
*/
export const PRODUCT_JSONLD = (process.env['SEO_PRODUCT_JSONLD'] ?? '1') !== '0';