Skip to content

docs(site): add a social share card for link previews - #87

Merged
luoxuanzao merged 1 commit into
mainfrom
docs/og-image
Sep 29, 2026
Merged

luoxuanzao merged 1 commit into
mainfrom
docs/og-image

Conversation

@luoxuanzao

Copy link
Copy Markdown
Member

Summary

  • Links to the docs site currently render as bare text cards in chat apps because no og:image / twitter:image is emitted anywhere.
  • Adds assets/social-card.jpg, a 1200x630 center crop of assets/preview.png (122 KB), synced into the site by scripts/sync-assets.mjs like the existing preview image.
  • Sets themeConfig.image so Docusaurus emits absolute og:image / twitter:image on every page, both locales.
  • docs/.gitignore now ignores the whole synced static/img/ dir instead of naming preview.png.

Test plan

  • npm run build in docs/ succeeds for en and zh-Hans
  • Built HTML contains <meta property="og:image" content="https://qoderai.github.io/Qoderian/img/social-card.jpg"> and the matching twitter:image
  • build/img/social-card.jpg and build/zh-Hans/img/social-card.jpg exist
  • After merge, paste a docs URL into a chat app and confirm the card shows the image

og:image and twitter:image were absent, so links to the docs site
rendered as bare text cards in chat apps. The card is a 1200x630 crop
of assets/preview.png, synced into the site like the other assets.

Co-authored-by: QoderAI (Qwen 3.8 Max) <[email protected]>
@luoxuanzao
luoxuanzao merged commit bf3ea82 into main Sep 29, 2026
11 of 12 checks passed
@luoxuanzao
luoxuanzao deleted the docs/og-image branch September 29, 2026 16:31

This branch had an error being deployed

1 failed deployment
github-pages — 77a0a8c7 Deployed Sep 29, 2026 by luoxuanzao via deploy #4
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