Skip to content

Add Open Graph and social card metadata configuration#6494

Draft
theosanderson wants to merge 3 commits into
mainfrom
claude/organism-social-graph-image-jU0cm
Draft

Add Open Graph and social card metadata configuration#6494
theosanderson wants to merge 3 commits into
mainfrom
claude/organism-social-graph-image-jU0cm

Conversation

@theosanderson
Copy link
Copy Markdown
Member

@theosanderson theosanderson commented May 21, 2026

Description

Adds support for configuring Open Graph and social card metadata at the site level. This allows customization of how pages appear when shared on social media platforms.

Changes

  • Schema & Config: Added openGraph configuration object to the Helm values schema and website config with support for:

    • image: Default Open Graph image (relative paths resolved against page URL)
    • description: Default meta description for pages
    • twitterCard: Twitter card type (summary, summary_large_image, player, app)
  • Layout: Updated BaseLayout.astro to:

    • Accept optional description prop
    • Resolve social card image from organism-specific image or site-wide default
    • Generate appropriate Open Graph and Twitter meta tags
    • Default Twitter card type to summary_large_image if image is configured, otherwise summary
    • Include description in both Open Graph and standard meta tags
  • Helm: Added template support for passing openGraph configuration to the website config

PR Checklist

  • All necessary documentation has been adapted.
  • The implemented feature is covered by appropriate, automated tests.
  • Any manual testing that has been done is documented (i.e. what exactly was tested?)

Testing

No additional testing needed. The changes are configuration-driven and the meta tag generation is straightforward. Existing tests should cover the layout rendering, and the configuration schema validation will catch any invalid inputs.

https://claude.ai/code/session_01M5PyXCAKKjLKGvyDV7Z9pZ

🚀 Preview: Add preview label to enable

claude added 3 commits May 21, 2026 15:06
Add og:image and twitter:image meta tags to BaseLayout, populated
from the current organism's configured image when the page is within
an organism context (either via the URL `:organism` param or the
`implicitOrganism` prop, e.g. on sequence detail pages).

The organism image path is resolved against the current URL so the
emitted meta tag contains an absolute URL, as required by social
platforms when generating link previews.
Introduce a top-level `openGraph` config object (image + description)
so instances can configure their site-wide social card without
hand-rolling `<meta>` tags via `additionalHeadHTML`. Plumb it through
the helm chart (values.schema.json + _common-metadata.tpl).

BaseLayout now emits a coherent set of social tags:

- og:type, og:url, og:title (already present), og:description, og:image
- twitter:card (summary_large_image when an image is available,
  otherwise summary), twitter:url, twitter:title, twitter:description,
  twitter:image
- <meta name="description"> for general SEO

Image resolution:

1. The current organism's `schema.image` when the page is within an
   organism context (URL `:organism` param or `implicitOrganism` prop).
2. Otherwise the site-wide `openGraph.image`.

Description resolution:

1. A per-page `description` prop on BaseLayout (new optional prop).
2. Otherwise the site-wide `openGraph.description`.

Image paths are resolved against the current URL so the emitted
absolute URLs satisfy what social platforms require.
Add an optional `twitterCard` field to the top-level `openGraph` config,
typed as an enum of the four card types Twitter/X supports (`summary`,
`summary_large_image`, `player`, `app`). The schema is enforced both in
the website's zod config and the helm chart's values.schema.json.

When unset, the previous defaulting logic is preserved:
`summary_large_image` if a card image is available (either from the
current organism's `schema.image` or from `openGraph.image`), otherwise
`summary`.
@claude claude Bot added website Tasks related to the web application deployment Code changes targetting the deployment infrastructure labels May 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployment Code changes targetting the deployment infrastructure website Tasks related to the web application

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants