Repository navigation
Add Open Graph / social preview tags + OG image to the docs - #15195
Closed
astra-intelligence wants to merge 2 commits into
Closed
astra-intelligence wants to merge 2 commits into
astra-intelligence wants to merge 2 commits into
Conversation
docs.pytest.org had zero og:* and twitter:* meta tags, so every link shared on X/Twitter, LinkedIn, Slack, Discord, or iMessage rendered a blank preview card. - Add a furo page.html override (doc/en/_templates/page.html) emitting og:site_name/type/title/description/image(+width/height) and twitter:card/title/description/image on every page. - Add a 1200x630 OG image (doc/en/_static/og-image.png) generated with Pillow-only tools/make-og-image.py (reproducible), using the project's own pytest1.png logo. Co-Authored-By: Paperclip <noreply@paperclip.ing>
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Open Graph / social preview tags + OG image to the docs
Problem
docs.pytest.org— one of the most-shared documentation sites in the Python ecosystem — has zeroog:*and zerotwitter:*meta tags in its<head>. Every link to the docs shared on X/Twitter, LinkedIn, Slack, Discord, or iMessage renders a blank preview card (just the URL, no title, no description, no image).Fix
doc/en/_templates/page.html— a furopage.htmloverride (via the documented{% extends "!page.html" %}+extraheadblock pattern) that emits, on every page:og:site_name,og:type,og:title(per-page),og:description,og:image(+ width/height)twitter:card(summary_large_image),twitter:title,twitter:description,twitter:imagedoc/en/_static/og-image.png— a 1200×630 Open Graph image (the standard social-card size), generated with a Pillow-only, reproducible scripttools/make-og-image.pythat composites the project's ownpytest1.pnglogo onto a clean white card with the official tagline and section pills.Verification
sphinx-build -b html doc/ensucceeds with no warnings.index.htmland subpages (e.g.getting-started.html), with per-pageog:title._static/og-image.pngin the built output.This is a small, self-contained docs improvement — no runtime code changes. After merge, docs.pytest.org links will render proper rich preview cards everywhere they're shared.