Skip to content

Add og:image and social preview meta to website - #1950

Merged
coliff merged 1 commit into
mainfrom
add-og-image
Oct 9, 2026
Merged

coliff merged 1 commit into
mainfrom
add-og-image

Conversation

@coliff

@coliff coliff commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Requested by Christian · project thread

Short description of what this resolves

Before: links to htmlhint.com shared on social media, chat apps and Slack showed no preview image, even though Starlight already sets twitter:card to summary_large_image.

After: every page has a 1200×630 preview image with the HTMLHint logo, name and tagline.

Proposed changes

  • Add website/public/og-image.png (1200×630, dark background, existing logo, brand red accent)
  • Add og:image, og:image:width, og:image:height, og:image:alt, twitter:image and twitter:image:alt to the Starlight head config in website/astro.config.mjs, using an absolute https://htmlhint.com/og-image.png URL
  • Add a note to AGENTS.md that pull requests should be squashed to a single commit

Verified with npm run build: the tags render in build/index.html alongside Starlight's existing og:* tags.

og-image

🤖 Generated with Claude Code

https://claude.ai/code/session_013sSVPq8jM5vj3VFsnBEGPn

@coliff coliff self-assigned this Oct 9, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Deploying htmlhint with  Cloudflare Pages  Cloudflare Pages

Latest commit: 34d57ac
Status: ✅  Deploy successful!
Preview URL: https://29a6037d.htmlhint.pages.dev
Branch Preview URL: https://add-og-image.htmlhint.pages.dev

View logs

@coliff
coliff marked this pull request as ready for review October 9, 2026 05:41
Copilot AI balanced review requested due to automatic review settings October 9, 2026 05:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Twitter image lacks platform-specific alternative text for screen-reader users.

1 open finding
What changed in this PR

Adds a consistent social preview image across the HTMLHint website.

Changes:

  • Adds a 1200×630 branded Open Graph image.
  • Configures Open Graph and Twitter image metadata.
File Description
website/​astro.config.mjs Adds social preview metadata.
website/​public/​og-image.png Provides the branded preview image.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread website/astro.config.mjs
- Add 1200x630 social preview image (website/public/og-image.png)
- Add og:image, og:image:width/height/alt, twitter:image and twitter:image:alt meta tags
- Note in AGENTS.md that pull requests should be squashed to a single commit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013sSVPq8jM5vj3VFsnBEGPn
@coliff
coliff merged commit d70a33c into main Oct 9, 2026
7 checks passed
@coliff
coliff deleted the add-og-image branch October 9, 2026 05:54
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.

3 participants