Skip to content

Show the logo in link previews: give every page an og:image - #152

Merged
oblomov-dev merged 1 commit into
mainfrom
claude/abap2ui5-linkedin-preview-logo-x9430q
Aug 17, 2026
Merged

Show the logo in link previews: give every page an og:image#152
oblomov-dev merged 1 commit into
mainfrom
claude/abap2ui5-linkedin-preview-logo-x9430q

Conversation

@oblomov-dev

@oblomov-dev oblomov-dev commented Aug 17, 2026

Copy link
Copy Markdown
Member

A link to any page of this site previewed as the grey placeholder card on LinkedIn, Slack and WhatsApp. The reason: the site emitted no Open Graph tags at all — config.mjs head carried only the favicon, Font Awesome and the fonts, so there was no image for a crawler to find and nothing to fall back to.

Changes

  • docs/public/og-image.png — new, 1200x630: the logo plus the tagline, in the ratio LinkedIn renders as a large card. Anything narrower than 1200px is shown as a small square thumbnail, which is why the existing logo.png (1064x1042) is not a substitute.
  • config.mjs headog:image with an absolute URL (https://abap2ui5.github.io/docs/og-image.png; a relative one is silently dropped by every crawler), plus og:image:width/height/type/alt, og:type, og:site_name, twitter:card=summary_large_image, twitter:image.
  • transformPageData — per-page og:title, og:description, og:url and a canonical link, so a shared deep link previews as the page it points at (Installation | abap2UI5) instead of the site front page. Uses || rather than ?? for the fallbacks: a page without frontmatter carries an empty string here, not undefined, and an empty og:description shows as a blank line on the card.
  • docs/resources/logo.md — the image listed on the press-kit page next to the logo, the favicon and the cover.

Verification

Checked against the built HTML, not the source. dist/configuration/installation.html now carries these meta tags:

property / name content
og:image https://abap2ui5.github.io/docs/og-image.png
og:image:width / og:image:height 1200 / 630
og:title Installation | abap2UI5
og:description Build UI5 Apps Purely in ABAP
og:url https://abap2ui5.github.io/docs/configuration/installation.html
twitter:card summary_large_image

plus rel="canonical" pointing at the same URL.

npm run docs:build, npm test, npm run check:examples and npm run check:version all pass. check:samples skipped — no abap2UI5/samples checkout in this environment; no generated samples block is touched by this change.

After the deploy

LinkedIn caches a preview per URL for about a week, so the card only changes once the URL is re-crawled via the Post Inspector. Already-published posts keep the preview stored at post time and cannot be refreshed — they need a new post.

A link to any page of this site previewed as the grey placeholder card on
LinkedIn, Slack and WhatsApp: the site emitted no Open Graph tags at all, so
there was no image for a crawler to find and nothing to fall back to.

- docs/public/og-image.png, 1200x630 — the logo plus the tagline, in the ratio
  LinkedIn renders as a large card. Anything narrower than 1200px is shown as a
  small square thumbnail, which is why logo.png (1064x1042) is not a substitute.
- The og:image, og:type, og:site_name and twitter:card tags in config.mjs head,
  with an ABSOLUTE image url — a relative one is silently dropped by every
  crawler.
- og:title, og:description, og:url and a canonical link per page via
  transformPageData, so a shared deep link previews as the page it points at
  instead of the front page.

The image is listed on the press-kit page next to the logo and the cover.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7UnvgCmVFBFUVAuT2QH44
Copilot AI lite review requested due to automatic review settings August 17, 2026 15:51

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@oblomov-dev
oblomov-dev merged commit efce6fd into main Aug 17, 2026
1 check passed
@oblomov-dev
oblomov-dev deleted the claude/abap2ui5-linkedin-preview-logo-x9430q branch August 17, 2026 15:53
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