Skip to content

fix(seo): add image sharing cards to public pages - #264

Merged
chaxus merged 4 commits into
mainfrom
fix/social_preview
Oct 13, 2026
Merged

chaxus merged 4 commits into
mainfrom
fix/social_preview

Conversation

@chaxus

@chaxus chaxus commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Public pages currently expose text-only social metadata, without an image, and the editor has no sharing card. Add image-backed Open Graph and X cards across all 177 generated pages in seven languages, plus the editor, local history and public iframe demo.

Use concise localized homepage sharing copy covering Word, Excel, PowerPoint, PDF annotations, optional AI (Experimental Beta), WebMCP and PWA. Include product artwork for both the website and the repository's separate Social preview setting.

Design Decisions

  • Reuse one 1200 x 630 product PNG through the two existing page templates. Preserve each page's title, description, canonical URL and language. Keep homepage sharing titles separate from search titles.
  • Set twitter:card=summary_large_image; include image type, dimensions and matching OG/X image alt text.
  • Give editor/history static generic product cards while preserving noindex. Never use file names, query parameters or local document content.
  • Reuse the existing brand mark in editable SVG artwork. Include a 1280 x 640 GitHub image and an optional render script, with no new runtime dependency.
  • Keep the artwork, metadata and documentation in separate functional commits. A CI follow-up restricts the five-minute missing-check limit to fork heads; same-repository previews keep the existing 45-minute overall wait and fail immediately on concluded deployment errors. Refresh sitemap dates because the common page templates changed.

Risk Analysis

Low risk: static metadata, artwork, documentation and a bounded preview-wait fix. Editor behavior, route handling, vendor files, hosting policies and local document storage are unchanged. Keep HTTP 404 and vendor pages outside the promotional surface.

Verification

  • All 5300 unit tests passed in 173 files, including 188 new sharing checks and existing generated-page/canonical/hreflang contracts.
  • Three request-based E2E checks passed against the production build: initial HTML for all 177 public routes without JavaScript; deployed PNG response type, signature and dimensions; generic noindex editor/history cards.
  • Regression proof: the original implementation failed all 188 sharing checks. Temporarily removing the built PNG makes the image-delivery E2E fail; restoring it makes the full three-test suite pass.
  • Production build, lint/type checking, repository formatting, sitemap date check and git diff --check passed.
  • Visually inspected both PNGs: 1200 x 630 and 1280 x 640, approximately 45 KB each.
  • CI follow-up: 71 workflow tests, lint/type checking and repository formatting passed; two delayed-check regression cases failed before the fix. Re-ran the complete production build successfully and verified the built sharing PNG.
  • All 20 hosted checks passed on head 30bb576716c6f2e8d0b57d49635a87537d90eb8d. The deployed preview served correct static cards for English/Chinese homepages, the PDF page, editor and history; the sharing PNG returned HTTP 200 with the declared 1200 x 630 dimensions.

Code Concerns

No blocking findings in the final code review.

Merge Verdict

[APPROVE] Ready for review. All 20 hosted checks passed on 30bb576, including Cloudflare deployment, real preview smoke, standard E2E, Pages-semantics E2E, Docker E2E, timing budgets and lint/validation. A real X card after production deployment remains to be checked.

The initial Cloudflare deployment failed during repository cloning after about 16 minutes 40 seconds (HTTP/2 CANCEL, early EOF, invalid index-pack output), before build or deploy. The initial smoke gate independently exited after five minutes without seeing the check. The follow-up fixes that premature same-repository timeout and triggers a fresh deployment; it does not bypass deployment failures.

The repository Social preview is separate from website metadata; the user will upload the supplied GitHub PNG in repository settings. Testing a Twitterbot user agent validates static delivery, not actual X crawler access or cached-card refresh.

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying document with  Cloudflare Pages  Cloudflare Pages

Latest commit: 30bb576
Status: ✅  Deploy successful!
Preview URL: https://f4e5b278.document-7hm.pages.dev
Branch Preview URL: https://fix-social-preview.document-7hm.pages.dev

View logs

@chaxus
chaxus enabled auto-merge (rebase) October 13, 2026 06:45
@chaxus
chaxus merged commit b73929c into main Oct 13, 2026
20 checks passed
@chaxus
chaxus deleted the fix/social_preview branch October 13, 2026 06:51
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