Skip to content

Commit a5da7bc

Browse files
author
Miriad
committed
fix: rewrite OG templates as React elements — bypass HTMLRewriter
workers-og's parseHtml uses HTMLRewriter which corrupts HTML→VDOM conversion on CF Workers (text chunking, phantom child nodes). Passing React element objects directly to ImageResponse bypasses parseHtml entirely and works reliably. Rewrote all 4 OG endpoints to use React element builders: - buildOgElement() for blog/podcast/course (logo, badge, title, author) - buildDefaultOgElement() for generic pages (logo, title, URL) All endpoints use arrayBuffer() pattern to catch stream errors. Build: 21.75s ✅
1 parent e702897 commit a5da7bc

File tree

5 files changed

+407
-112
lines changed

5 files changed

+407
-112
lines changed

0 commit comments

Comments
 (0)