Skip to content

Link share images by their content so a redrawn card is fetched again - #88

Merged
Yanir-R merged 1 commit into
mainfrom
claude/project-thread-s953yj
Nov 26, 2026
Merged

Yanir-R merged 1 commit into
mainfrom
claude/project-thread-s953yj

Conversation

@Yanir-R

@Yanir-R Yanir-R commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Requested by Yanir · project thread

What changed

Every share image is now linked with a version from its content:

  • Home cards: og-image.png?v=<hash> / og-image-en.png?v=<hash> in index.html (og:image, twitter:image), the prerendered pages and the JSON-LD.
  • Per-page cards: share/<route>.jpg?v=<hash>, where the hash covers what the card says, its picture and scripts/share-cards.mjs (the card is drawn after the build, so its bytes do not exist yet).
  • New frontend/seo/versioned.mts holds both helpers.

Why

A link to yanirrot.com shared in LinkedIn showed the new title next to the old dark home card. LinkedIn (like Facebook and WhatsApp) caches an image under its URL, and the redrawn card was published under the same /og-image.png, so the re-read page pointed at a URL LinkedIn already had. A changed image now gets a new address; an unchanged one keeps its address and cache.

How to verify

  • cd frontend && npm run build, then grep og:image dist/index.html dist/en.html dist/blog/agents-ask-approval.html shows ?v= URLs.
  • After deploy, paste https://yanirrot.com into LinkedIn Post Inspector: the image should be the ink and yellow card.

Checklist

  • Every commit is signed off (git commit -s), see CONTRIBUTING.md (not signed off)
  • Backend: unchanged
  • Frontend: npm run typecheck, npm run lint, npm run format:check and npm run build pass from frontend/
  • bash .github/scripts/check_hygiene.sh passes from the repository root
  • No personal data, real paths, hostnames or credentials in code, tests or docs
  • Tests use invented data only
  • No duplicated logic; docs link to an existing explanation instead of repeating it
  • Docs updated if behavior or a privacy claim changed

Generated by Claude Code

LinkedIn kept showing the old home card next to the new title: it caches
an image under its URL, and the redrawn card was published under the same
/og-image.png. Share images are now linked as ?v=<content hash>, so a
changed card is a new address and an unchanged one keeps its cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014dGcvXuyBrVM98ntKmvVB8
@Yanir-R
Yanir-R merged commit 07010d3 into main Nov 26, 2026
3 checks passed
@Yanir-R
Yanir-R deleted the claude/project-thread-s953yj branch November 26, 2026 10:15
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