From ce45b2cb390cda55931419ab7441df139421ea56 Mon Sep 17 00:00:00 2001 From: Teodor Calin Date: Fri, 29 May 2026 08:31:57 -0700 Subject: [PATCH] fix(seo): wire route-specific OG images per Artemii spec (PILOT-26) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per Artemii's comment on PILOT-26, each top-level route gets its own 1200×630 Open Graph image. This PR wires up the routing structure; the actual JPGs need to be dropped in /public/og/ by hand: / → /og/main.jpg /plans → /og/plans.jpg /docs/... → /og/docs.jpg /blog/... → /og/blogs.jpg (fallback for individual posts too) Until the JPGs land, the og:image meta tags will 404. The fallback default in BaseHead.astro stays /img/pilot.png for any page that doesn't override. public/og/README.md spells out the expected filenames + dimensions. Changes: - index.astro: ogImage → /og/main.jpg - plans.astro: ogImage added → /og/plans.jpg - blog/index.astro: ogImage added → /og/blogs.jpg - DocLayout.astro: ogImage prop with /og/docs.jpg default; pass-through so individual doc pages can override if needed BaseHead already emits og:image, twitter:image, twitter:card=summary_large_image. Closes PILOT-26 --- public/og/README.md | 12 ++++++++++++ src/layouts/DocLayout.astro | 5 +++-- src/pages/blog/index.astro | 2 +- src/pages/index.astro | 2 +- src/pages/plans.astro | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 public/og/README.md diff --git a/public/og/README.md b/public/og/README.md new file mode 100644 index 0000000..05f17af --- /dev/null +++ b/public/og/README.md @@ -0,0 +1,12 @@ +# Open Graph images + +Per Artemii's spec on [PILOT-26](https://vulturelabs.atlassian.net/browse/PILOT-26), drop the following JPGs in this directory and the meta tags wired in this PR will pick them up automatically: + +- `main.jpg` → used by `/` (src/pages/index.astro) +- `plans.jpg` → used by `/plans` (src/pages/plans.astro) +- `docs.jpg` → used by `/docs/` and all docs sub-routes (src/pages/docs/index.astro + layout) +- `blogs.jpg` → used by `/blog/` index AND every individual blog post (fallback per Artemii's note) + +Recommended dimensions: **1200 × 630 px** (Open Graph standard for `summary_large_image`). + +Until the JPGs land, the meta tags will 404 — but the fallback default in `BaseHead.astro` remains `/img/pilot.png` for any page that doesn't override ogImage. diff --git a/src/layouts/DocLayout.astro b/src/layouts/DocLayout.astro index 275b390..394dca3 100644 --- a/src/layouts/DocLayout.astro +++ b/src/layouts/DocLayout.astro @@ -16,9 +16,10 @@ interface Props { prev?: { label: string; href: string }; next?: { label: string; href: string }; hidePageNav?: boolean; + ogImage?: string; } -const { title, description, activePage, canonicalPath, prev, next, hidePageNav } = Astro.props; +const { title, description, activePage, canonicalPath, prev, next, hidePageNav , ogImage } = Astro.props; const canonicalUrl = canonicalPath ? `https://pilotprotocol.network${canonicalPath}` : undefined; const breadcrumbItems = [ @@ -32,7 +33,7 @@ if (activePage !== 'index') { - +