feat(website): Open Graph social card

Add a 1200x630 social card (dark bg, monospace, teal database-table
motif, the relplay/RDBMS reveal) shown when pages are shared. Source
SVG in src/assets/og-card.svg, rasterised to public/og-card.png with
sharp. Wire site-wide og:image + twitter summary_large_image tags via
Starlight head, with the absolute relplay.org URL.
This commit is contained in:
claude@clouddev1
2026-06-11 18:59:02 +00:00
parent abd3739168
commit 09b64cbfb7
3 changed files with 52 additions and 0 deletions
+19
View File
@@ -40,6 +40,25 @@ export default defineConfig({
// TODO(Phase B): a header social link to the repo is deliberately omitted
// — the source/issues link lives understated in the footer instead.
customCss: ['./src/styles/global.css'],
// Open Graph / Twitter social card. Starlight emits og:title/url/type
// from `site`, but not an image, so add a single site-wide card.
// Source: src/assets/og-card.svg → public/og-card.png (rasterise with
// sharp; see the SVG header for the one-liner). Absolute URL required
// by scrapers — derived from the `site` origin.
head: [
{ tag: 'meta', attrs: { property: 'og:image', content: 'https://relplay.org/og-card.png' } },
{ tag: 'meta', attrs: { property: 'og:image:width', content: '1200' } },
{ tag: 'meta', attrs: { property: 'og:image:height', content: '630' } },
{
tag: 'meta',
attrs: {
property: 'og:image:alt',
content: 'RDBMS Playground — learn relational databases by doing.',
},
},
{ tag: 'meta', attrs: { name: 'twitter:card', content: 'summary_large_image' } },
{ tag: 'meta', attrs: { name: 'twitter:image', content: 'https://relplay.org/og-card.png' } },
],
// Register the simple-mode command grammar with Expressive Code (Shiki).
expressiveCode: { shiki: { langs: [rdbmsLang, rdbmsSyntax] } },
// Pragmatic structure (ADR-website-001 §7 / website/STYLE.md): Getting