Commit dbef0313ea for handsontable.com
commit dbef0313ea8db55ca4f15cd063464d66d0d8d850
Author: Artur Mędrygał <artur.medrygal@handsontable.com>
Date: Thu Nov 26 09:59:23 2026 +0100
DEV-4222: Use the new cover image for link previews (#14480)
(cherry picked from commit 91122df54b1ca6b36431f914763d2f3019859304)
diff --git a/docs/AGENTS.md b/docs/AGENTS.md
index e098e15424..5906a83b83 100644
--- a/docs/AGENTS.md
+++ b/docs/AGENTS.md
@@ -1252,7 +1252,7 @@ Unit tests: `src/lib/__tests__/headway-bell.test.mjs` (`npm run docs:test:plugin
Starlight emits `og:title`, `og:description`, and `twitter:card=summary_large_image`, but no image, so link previews on LinkedIn, Slack, and X show a blank card unless the site adds one. The VuePress-to-Starlight migration (#12195) dropped it with no failing check. `src/lib/social-image.mjs` now owns it: `SOCIAL_IMAGE` names the file in `public/` (`handsontable-docs-cover.png`), its absolute URL, its size, and its alt text, and `socialImageHead()` returns the `og:image*` and `twitter:image*` entries that `astro.config.mjs` spreads into the Starlight `head`.
- **The URL is absolute,** because crawlers don't resolve a relative `og:image`. So a pull request preview serves the production copy of the file: a new or resized image shows only after the production deploy.
-- **The size is declared by hand and checked.** `src/lib/__tests__/social-image.test.mjs` (`npm run docs:test:plugins`) reads the PNG header and fails when `width` or `height` does not match the file, and it fails when the config stops spreading `socialImageHead()`. Replace the image with another 1200x630 PNG, or update both numbers.
+- **The size is declared by hand and checked.** `src/lib/__tests__/social-image.test.mjs` (`npm run docs:test:plugins`) reads the PNG header and fails when `width` or `height` does not match the file, and it fails when the config stops spreading `socialImageHead()`. Replace the image with another PNG of about 1.91:1 to 2:1 and update both numbers in `SOCIAL_IMAGE`.
- **Every page gets the same image.** A page-specific image needs a frontmatter `head` entry, which Starlight merges over the config's.
This is tooling, not content, so the docs sync does not port it to `prod-docs/*`: it reaches the live site at the next prod-docs cut or through a hand cherry-pick.
diff --git a/docs/public/handsontable-docs-cover.png b/docs/public/handsontable-docs-cover.png
index 618044a6f0..ec3111b580 100644
Binary files a/docs/public/handsontable-docs-cover.png and b/docs/public/handsontable-docs-cover.png differ
diff --git a/docs/src/lib/social-image.mjs b/docs/src/lib/social-image.mjs
index 74b2f64f9e..3b157e7424 100644
--- a/docs/src/lib/social-image.mjs
+++ b/docs/src/lib/social-image.mjs
@@ -12,9 +12,9 @@ import { SITE_URL } from '../agent-note.mjs';
export const SOCIAL_IMAGE = {
file: 'handsontable-docs-cover.png',
url: `${SITE_URL}/docs/handsontable-docs-cover.png`,
- width: 1200,
- height: 630,
- alt: 'Handsontable Documentation',
+ width: 1160,
+ height: 600,
+ alt: 'Handsontable DataGrid: read the docs',
};
/**