Skip to content

feat(og): point every page at its own share card#71

Merged
TTigger merged 1 commit into
masterfrom
feat/og-meta
Jul 9, 2026
Merged

feat(og): point every page at its own share card#71
TTigger merged 1 commit into
masterfrom
feat/og-meta

Conversation

@TTigger

@TTigger TTigger commented Jul 9, 2026

Copy link
Copy Markdown
Owner

feat(og): point every page at its own share card

The 66 cards from #70 existed but nothing referenced them. BaseLayout
resolves og:image and twitter:image through ogImagePath(toolId, locale),
so /tools/gear-calculator advertises /og/zh/gear-calculator.png and its
English twin advertises /og/en/gear-calculator.png. Pages with no toolId
fall back to the home card.

  • twitter:card summary -> summary_large_image. The old value rendered a
    small square thumbnail, which is what the 512px logo was shaped for;
    a 1200x630 card needs the large variant or X crops it.
  • og:image:width / height / alt added. Facebook and LINE size the card
    from the tags before fetching the image, and skip the preview entirely
    on a cold cache if they have to guess.
  • meta name=author added.
  • The Chinese home description was 14 characters. Our own URL Audit
    scores anything under 50 as a warning, and it was right: the old text
    ("TTigger's tool collection and portfolio") said nothing about what
    the site does. Rewritten to name the tool families and the fact that
    nothing is uploaded. The English default was already 51 and stands.

Tool pages already pass their own descriptions, so only the home default
needed lengthening.

e2e covers what unit tests can't reach here, since BaseLayout is an
Astro component: the resolved og:image URL per locale, the card
dimensions and twitter:card value, that the advertised image actually
returns 200 image/png rather than a 404, and that the home description
lands inside the 50-160 window the audit tool checks for.

Tests: typecheck:api, 508 unit, 54 e2e (6 new).

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

The 66 cards from #70 existed but nothing referenced them. BaseLayout
resolves og:image and twitter:image through ogImagePath(toolId, locale),
so /tools/gear-calculator advertises /og/zh/gear-calculator.png and its
English twin advertises /og/en/gear-calculator.png. Pages with no toolId
fall back to the home card.

- twitter:card summary -> summary_large_image. The old value rendered a
  small square thumbnail, which is what the 512px logo was shaped for;
  a 1200x630 card needs the large variant or X crops it.
- og:image:width / height / alt added. Facebook and LINE size the card
  from the tags before fetching the image, and skip the preview entirely
  on a cold cache if they have to guess.
- meta name=author added.
- The Chinese home description was 14 characters. Our own URL Audit
  scores anything under 50 as a warning, and it was right: the old text
  ("TTigger's tool collection and portfolio") said nothing about what
  the site does. Rewritten to name the tool families and the fact that
  nothing is uploaded. The English default was already 51 and stands.

Tool pages already pass their own descriptions, so only the home default
needed lengthening.

e2e covers what unit tests can't reach here, since BaseLayout is an
Astro component: the resolved og:image URL per locale, the card
dimensions and twitter:card value, that the advertised image actually
returns 200 image/png rather than a 404, and that the home description
lands inside the 50-160 window the audit tool checks for.

Tests: typecheck:api, 508 unit, 54 e2e (6 new).

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

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tiglet Ready Ready Preview, Comment Jul 9, 2026 9:40am

@TTigger TTigger merged commit 230ac8f into master Jul 9, 2026
3 checks passed
@TTigger TTigger deleted the feat/og-meta branch July 9, 2026 09:47
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.

1 participant