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') { - +