Skip to content

Docs: add an og:image social preview tag - #1915

Merged
GreenFlux merged 3 commits into
developfrom
docs/add-og-image
Nov 25, 2026
Merged

GreenFlux merged 3 commits into
developfrom
docs/add-og-image

Conversation

@GreenFlux

@GreenFlux GreenFlux commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Context

Docs links shared on LinkedIn, Slack, and X show a blank preview card. Starlight emits og:title, og:description, and twitter:card=summary_large_image, but no image. The live VuePress site has the same gap: it emits no og: tags at all.

This adds og:image, its width, height, and alt, plus twitter:image and twitter:image:alt, to the Starlight head. A SOCIAL_IMAGE constant in docs/astro.config.mjs holds the URL, size, and alt text in one place, and docs/README.md ("Social preview image") documents how to change it. They point at the handsontable.com default card (https://handsontable.com/og/default.png, 1200x630, live now), which carries the HyperFormula mark. A dedicated HyperFormula docs card would look better, but none exists. Swapping one in later means changing one URL. The URL is absolute because crawlers don't resolve relative og:image paths.

The same fix for the Handsontable DataGrid docs: handsontable/handsontable#14451.

How did you test your changes?

  • node --check docs/astro.config.mjs and eslint astro.config.mjs pass.
  • curl -I https://handsontable.com/og/default.png returns 200 image/png.
  • On the branch preview, guide/basic-usage.html renders all five new tags next to Starlight's own og: and twitter:card tags.
  • Still to do after release: LinkedIn Post Inspector should show the card for a docs URL.

AI assistance

Claude Code wrote the change and this description.

Compatibility with Excel and Google Sheets

Not applicable.

Public API changes

None.

Out of scope and follow-ups

  • No per-page images. Every page gets the same card.
  • No automated check. The docs have no test runner, and the image is hosted on handsontable.com, so a size check would need the network. Adding one would mean a CI change. The README says to confirm the tags on the branch preview after changing them.
  • The live site stays on VuePress (master) until the Starlight docs are released. No VuePress fix is included.

Types of changes

  • Change to the documentation

Checklist

  • I read my own diff end to end before requesting a review.
  • No changelog entry is needed (docs only).

🤖 Generated with Claude Code

Starlight emits og:title, og:description, and a large-image Twitter card
but no image, so shared docs links render a blank preview card. Point
og:image and twitter:image at the handsontable.com default card, which
carries the HyperFormula mark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@handsontable-pr-review handsontable-pr-review Bot 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.

Tip

Low risk: Documentation-only change adding static social preview meta tags to the docs site config; no runtime code, API, or build behavior is affected.

Full review: no issues found.

Want a deeper review? Comment /review improve on its own line: a full review of the latest commit with an extra fix-oriented pass (about 2x the cost).

@github-actions

github-actions Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Performance comparison of head (33dcd62) vs base (2aaab7d)

                                     testName |    base |    head |  change
---------------------------------------------------------------------------
                                      Sheet A |  365.57 |  358.62 |  -1.90%
                                      Sheet B |  120.36 |  126.66 |  +5.23%
                                      Sheet T |   104.7 |  108.19 |  +3.33%
                                Column ranges |  518.93 |  522.17 |  +0.62%
                                Sorted lookup | 17545.1 | 18193.4 |  +3.70%
Sheet A:  change value, add/remove row/column |   11.76 |   14.22 | +20.92%
 Sheet B: change value, add/remove row/column |  107.66 |  118.26 |  +9.85%
                   Column ranges - add column |  132.18 |  128.93 |  -2.46%
                Column ranges - without batch |  413.23 |   408.2 |  -1.22%
                        Column ranges - batch |  108.11 |   95.19 | -11.95%

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperformula-docs 33dcd62 Commit Preview URL

Branch Preview URL
Nov 25 2026, 10:45 AM

GreenFlux and others added 2 commits November 25, 2026 05:39
The image URL was written twice. SOCIAL_IMAGE now holds the URL, size,
and alt text, and the README documents where the image is set and how
to change it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@GreenFlux
GreenFlux requested a review from demtario November 25, 2026 11:12
@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.75%. Comparing base (2aaab7d) to head (33dcd62).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #1915   +/-   ##
========================================
  Coverage    97.75%   97.75%           
========================================
  Files          212      212           
  Lines        18817    18817           
  Branches      4436     4437    +1     
========================================
  Hits         18394    18394           
+ Misses         423      415    -8     
- Partials         0        8    +8     

see 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GreenFlux
GreenFlux merged commit 8e8b8ae into develop Nov 25, 2026
36 checks passed
@GreenFlux
GreenFlux deleted the docs/add-og-image branch November 25, 2026 11:13
GreenFlux added a commit that referenced this pull request Nov 25, 2026
### Context
Starlight takes a page's meta description and the `og:description` used
in link previews from the `description` frontmatter field. Only 1 of the
57 guide pages had one. All the others fell back to the site-wide
"HyperFormula is a high-performance calculation engine…" line, so every
search result and shared link described the page the same way.

This adds a one-sentence `description` to the 56 guide pages that lacked
one, as `dev-docs/DOCS-CONTENT-GUIDE.md` asks ("a one-sentence
`description` that names the concept"). Each one is written from the
page's own content. They run 47 to 130 characters, so search results
don't cut them short. `built-in-functions.tmpl.md` gets its description
in the template, which the generator copies into
`built-in-functions.md`.

This complements the `og:image` change in #1915. Neither depends on the
other.

### How did you test your changes?
- Every one of the 57 guide frontmatter blocks parses with js-yaml and
has a string `title` and `description`.
- Each claim was checked against the page body (for example, the
currency page covers input recognition and `TEXT` output, and the error
examples are ones the page lists).
- Still to do: on the docs preview, a guide page's `<meta
name="description">` and `og:description` should show its own sentence.

### AI assistance
Claude Code wrote the descriptions and this description. A human should
read the list.

### Compatibility with Excel and Google Sheets
Not applicable.

### Public API changes
None.

### Out of scope and follow-ups
- The API reference pages under `docs/api/` are generated and keep the
site-wide description.
- No title or body changes.

### Types of changes
- [x] Change to the documentation

### Checklist
- [x] I read my own diff end to end before requesting a review.
- [x] No changelog entry is needed (docs only).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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