Skip to content

Add link preview metadata and map image for the AIS page - #87

Open
bkeepers wants to merge 1 commit into
mainfrom
ais-og-image
Open

Add link preview metadata and map image for the AIS page#87
bkeepers wants to merge 1 commit into
mainfrom
ais-og-image

Conversation

@bkeepers

Copy link
Copy Markdown
Member

Link previews for /ais were text only and the title was just "AIS". The page now has a title that says what it is, a plain-language description, and a 1200×630 capture of the live map as the preview image. MainLayout takes an optional image prop for this and emits og:image / twitter:image as absolute URLs.

This commit was made on ais-pages after #86 had merged, so it is cherry-picked here.

Copilot AI lite review requested due to automatic review settings August 22, 2026 02:39
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
openwaters-api 6cab1fc Commit Preview URL

Branch Preview URL
Aug 22 2026, 02:40 AM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds richer social link previews for the /ais product page by introducing an optional preview image capability in the shared MainLayout, and then wiring it up on the AIS page.

Changes:

  • Update /ais page title and description to be more descriptive for SEO/link unfurls.
  • Add an optional image prop to MainLayout and emit og:image / twitter:image when provided.
  • Set /ais to use a new preview image at /og/ais.png.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
website/src/pages/ais/index.astro Updates the AIS page metadata (title/description) and supplies an OG/Twitter preview image path.
website/src/layouts/MainLayout.astro Adds optional image prop and outputs OG/Twitter image meta tags derived from Astro.site.
Suppressed comments (1)

website/src/layouts/MainLayout.astro:54

  • content={imageURL} relies on implicit stringification of a URL object. Using imageURL.href is explicit and avoids any renderer quirks.
    {imageURL && <meta property="og:image" content={imageURL} />}

    <!-- Twitter -->
    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:title" content={fullTitle} />
    <meta name="twitter:description" content={description} />
    {imageURL && <meta name="twitter:image" content={imageURL} />}

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 21 to +22
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const imageURL = image && new URL(image, Astro.site);
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
openwaters-io 6cab1fc Commit Preview URL

Branch Preview URL
Aug 22 2026, 02:40 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants