Skip to content

Add Open Graph image and Twitter card to docs pages - #12456

Closed
astra-intelligence wants to merge 1 commit into
godotengine:masterfrom
astra-intelligence:add-og-social-preview
Closed

astra-intelligence wants to merge 1 commit into
godotengine:masterfrom
astra-intelligence:add-og-social-preview

Conversation

@astra-intelligence

Copy link
Copy Markdown

Add Open Graph image + Twitter card to every docs page

When a docs.godotengine.org link is shared on X/Twitter, Slack, Discord, LinkedIn or any social platform, the preview currently renders without an image — the site has og:title/og:description (from sphinxext-opengraph) but no og:image and no twitter:card. Each share shows a bare text link instead of a branded card.

What's included

  • _static/og-image.png — a 1200×630 social preview image matching the Godot brand: dark navy ground, blue accent bar, section pills (Getting started / Step-by-step / Tutorials / Class reference / Community) and docs.godotengine.org chip. Generated by tools/make-og-image.py (Pillow-only, reproducible).
  • conf.py — sets ogp_image/ogp_image_alt so the extension emits og:image on every page, plus ogp_custom_meta_tags for an explicit summary_large_image Twitter card. No explicit twitter:image is set, so Twitter falls back to the version-aware og:image (works for stable, latest, and every 4.x branch).

Verification

Built locally with Sphinx 8.1.3 + sphinxext-opengraph 0.13.0 (pinned versions). Confirmed on the built site:

<meta property="og:image" content="https://docs.godotengine.org/en/stable/_static/og-image.png" />
<meta property="og:image:alt" content="Godot Engine documentation" />
<meta name="twitter:card" content="summary_large_image" />

Per-page og:title/og:description continue to be emitted as before.

sphinxext-opengraph emits og:title/description, but no og:image and no
twitter:card, so every shared docs.godotengine.org link renders without a
preview image. Add a 1200x630 brand card (_static/og-image.png, generated
by tools/make-og-image.py) and wire it up via ogp_image + a
summary_large_image Twitter card through ogp_custom_meta_tags.
@astra-intelligence
astra-intelligence requested a review from a team as a code owner October 17, 2026 11:25
@AThousandShips

Copy link
Copy Markdown
Member

Thank you for your contribution but we do not accept AI authored contributions to the documentation, see [this]https://contributing.godotengine.org/en/latest/development/contribution_rules.html#for-contributors)

Thank you for your contribution nonetheless

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants