Skip to content

Commit 6025cd2

Browse files
Use compact summary link-preview card and crisp 512px OG icons
Shared links rendered a giant image dumped below the text (Discord) because twitter:card was summary_large_image. Switch to summary so Discord/Slack/X show the compact card with a small icon thumbnail beside the text (PyPI-style). Regenerate all Open Graph icons at 512x512 (rasterized from the brand product SVGs onto a white square; replaces the 128px versions that were below the ~200px thumbnail minimum) and declare og:image:width/height/type/alt. Teams' stale preview is its own cache and refreshes separately.
1 parent 6ab3afe commit 6025cd2

19 files changed

Lines changed: 15 additions & 11 deletions

CHANGELOG.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ tags), so changes accumulate under **[Unreleased]**.
1010
## [Unreleased]
1111

1212
### Added
13-
- **Branded link previews (Open Graph / Twitter Card images)** — shared links (Teams, Slack, LinkedIn, etc.)
14-
now show a GroupDocs image instead of a generic placeholder: the GroupDocs symbol on the site root/home and
15-
the product's own icon on each product build. `og:image` was previously empty (the `utils/featured` resolver
16-
fell back to `Site.Params.images`, which was unset because the config key sits under `[params.meta]`); the
17-
resolver now derives the image from the build (product key = first path segment of the URL). Icons live in
18-
theme static at `/img/og/` (GroupDocs symbol + 15 product PNGs).
13+
- **Branded link previews (Open Graph / Twitter Card images)** — shared links (Teams, Slack, LinkedIn, Discord,
14+
etc.) now show a GroupDocs image instead of a generic placeholder: the GroupDocs symbol on the site root/home
15+
and the product's own icon on each product build. `og:image` was previously empty (the `utils/featured`
16+
resolver fell back to `Site.Params.images`, which was unset because the config key sits under `[params.meta]`);
17+
the resolver now derives the image from the build (product key = first path segment of the URL). The card uses
18+
the compact `summary` Twitter Card (small icon thumbnail beside the text) rather than `summary_large_image`, and
19+
the icons are crisp **512×512** PNGs (rasterized from the brand product SVGs onto a white square) with
20+
`og:image:width`/`height`/`type`/`alt` declared. Icons live in theme static at `/img/og/`.
1921
- **Verified getting-started code** on the family pages — the "Getting started" tabs now render real
2022
snippets from `data/getting_started.yaml` (keyed product → platform), sourced from the official
2123
products content and **compile-verified against the real SDKs** by runnable apps under

themes/docs/layouts/partials/microformats/opengraph.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
{{- end }}
1212
{{- with partial "utils/featured" . }}
1313
<meta property="og:image" content="{{ . }}" />
14+
<meta property="og:image:type" content="image/png" />
15+
<meta property="og:image:width" content="512" />
16+
<meta property="og:image:height" content="512" />
17+
<meta property="og:image:alt" {{ partial "utils/title" $ | printf "content=%q" | safeHTMLAttr }} />
1418
{{- end }}
1519
{{- with partial "utils/description" . }}
1620
<meta property="og:description" content="{{ . | plainify | htmlUnescape | chomp }}" />

themes/docs/layouts/partials/microformats/twitter_cards.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
{{- with partial "utils/featured" . }}
2-
<meta name="twitter:card" content="summary_large_image" />
3-
{{- else }}
4-
<meta name="twitter:card" content="summary" />
5-
{{- end }}
1+
{{- /* Compact card: a small icon thumbnail on the right of the text (our og:image is a square brand
2+
icon, not a 1.91:1 hero), matching how Discord/Slack/X render PyPI-style links. */}}
3+
<meta name="twitter:card" content="summary" />
64
<meta name="twitter:title" {{ partial "utils/title" . | printf "content=%q" | safeHTMLAttr }} />
75
{{- with partial "utils/featured" . }}
86
<meta property="twitter:image" content="{{ . }}" />
-696 Bytes
Loading
8.26 KB
Loading
4.23 KB
Loading
7.4 KB
Loading
-158 Bytes
Loading
12.7 KB
Loading
-99 Bytes
Loading

0 commit comments

Comments
 (0)