Skip to content

[BF-030] OG/Twitter Card 与工具页分享图 - #89

Merged
baixiangcpp merged 1 commit into
mainfrom
seo/BF-030-og-twitter-tool-images
Jun 22, 2026
Merged

[BF-030] OG/Twitter Card 与工具页分享图#89
baixiangcpp merged 1 commit into
mainfrom
seo/BF-030-og-twitter-tool-images

Conversation

@baixiangcpp

Copy link
Copy Markdown
Owner

Issue

Closes #54

Scope

  • Add localized default OG images for non-tool pages.
  • Regenerate localized tool share images from the tool registry and locale catalogs.
  • Route homepage, static pages, hub pages, and content pages to locale-aware default OG/Twitter images.
  • Strengthen the OG image gate to verify expected coverage, dimensions, byte budget, and stale image cleanup.

Implementation

  • Extended the OG generator to emit 7 default cards plus 861 canonical localized tool cards.
  • Localized the card badge/tagline copy for en, zh-CN, zh-TW, ja, ko, de, and fr.
  • Deleted 35 stale legacy share images that no longer map to canonical tool registry entries.
  • Updated metadata helpers and app layouts so default social cards use /og/default/{locale}.jpg and tool pages keep /og/tools/{locale}/{slug}.jpg.
  • Added tests for default image existence/dimensions, representative localized tool images, stale image gate execution, and locale-aware metadata.

Acceptance Criteria

  • 核心页面有完整 OG/Twitter metadata。
  • 工具页分享图存在并尺寸正确。
  • 新增页面有默认分享图策略。
  • npm run check:og-tool-images 通过。
  • npm run validate 通过。
  • npm run build 通过。

Validation

  • npm run lint - PASS
  • npm run test - PASS, 218 files / 1092 tests
  • npm run validate - PASS
  • npm run build - PASS
  • npm run test:e2e:smoke - PASS
  • npm run check:og-tool-images - PASS, 868 localized OG image(s), all 1200x630
  • npm test -- tests/guards/og-tool-images.test.ts tests/guards/seo-metadata-keywords.test.ts - PASS, 9 tests
  • npm test -- tests/guards/static-page-metadata.test.ts tests/guards/og-tool-images.test.ts tests/guards/seo-metadata-keywords.test.ts - PASS, 13 tests

Manual Checks

  • Verified issue [BF-030] OG/Twitter Card 与工具页分享图 #54 is open before starting this PR.
  • Confirmed no existing BF-030 PR was open before creating this one.
  • Visually inspected public/og/default/zh-CN.jpg and public/og/tools/de/json-formatter.jpg.
  • Checked built HTML contains locale-aware social image URLs for /, /fr/install-app, /zh-CN/trust-center, /en/json-formatter, and /de/json-formatter.

Privacy Check

  • 不采集工具输入
  • 不采集工具输出
  • 不新增未披露的外部请求
  • 不持久化敏感 payload
  • Share images are generated only from checked-in site copy, registry data, and locale catalogs.
  • No analytics payloads, query text, full URLs, file names, tokens, JWTs, secrets, logs, image contents, or generated output were added.

Screenshots / Evidence

  • public/og/default/zh-CN.jpg
  • public/og/default/fr.jpg
  • public/og/tools/en/json-formatter.jpg
  • public/og/tools/de/json-formatter.jpg
  • npm run generate:og-tool-images reported: generated 868 localized OG image(s), removed 35 stale image(s).

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 21, 2026

Copy link
Copy Markdown

Deploying byteflow with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7ee6d2c
Status: ✅  Deploy successful!
Preview URL: https://b8f8a4bd.byteflow-c58.pages.dev
Branch Preview URL: https://seo-bf-030-og-twitter-tool-i.byteflow-c58.pages.dev

View logs

@baixiangcpp
baixiangcpp force-pushed the seo/BF-030-og-twitter-tool-images branch from d0c7fe5 to 7ee6d2c Compare June 22, 2026 17:12
@baixiangcpp
baixiangcpp merged commit 826c40a into main Jun 22, 2026
2 checks passed
@baixiangcpp
baixiangcpp deleted the seo/BF-030-og-twitter-tool-images branch June 22, 2026 17:26
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.

[BF-030] OG/Twitter Card 与工具页分享图

1 participant