Commit 1f77f79
fix: remove HTML comments from OG templates — Satori treats them as child nodes
Root cause: Satori requires every parent element with multiple children
to have explicit "display: flex". HTML comments (<!-- ... -->) are parsed
as child nodes by workers-og's parseHtml (uses HTMLRewriter), causing
"Expected <div> to have explicit display: flex" errors that were
swallowed inside ImageResponse's ReadableStream (returning 200 + 0 bytes).
Fix: Remove all 6 HTML comments from og-utils.ts templates.
Also clean up debug code from blog.png.ts and default.png.ts,
keeping try/catch for error visibility.
Build: 18.04s ✅
Co-authored-by: seniordeveloper <seniordeveloper@miriad.systems>1 parent 2a8a5ac commit 1f77f79
File tree
3 files changed
+19
-71
lines changed- apps/web/src
- lib
- pages/api/og
3 files changed
+19
-71
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
154 | 153 | | |
155 | 154 | | |
156 | 155 | | |
| |||
163 | 162 | | |
164 | 163 | | |
165 | 164 | | |
166 | | - | |
167 | 165 | | |
168 | 166 | | |
169 | 167 | | |
| |||
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
183 | | - | |
184 | 181 | | |
185 | 182 | | |
186 | 183 | | |
| |||
251 | 248 | | |
252 | 249 | | |
253 | 250 | | |
254 | | - | |
255 | 251 | | |
256 | 252 | | |
257 | 253 | | |
| |||
261 | 257 | | |
262 | 258 | | |
263 | 259 | | |
264 | | - | |
265 | 260 | | |
266 | 261 | | |
267 | 262 | | |
| |||
280 | 275 | | |
281 | 276 | | |
282 | 277 | | |
283 | | - | |
284 | 278 | | |
285 | 279 | | |
286 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
| 39 | + | |
| 40 | + | |
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
16 | 23 | | |
17 | 24 | | |
18 | 25 | | |
19 | | - | |
20 | 26 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 27 | + | |
34 | 28 | | |
35 | 29 | | |
36 | | - | |
| 30 | + | |
37 | 31 | | |
38 | 32 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 33 | + | |
57 | 34 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 35 | + | |
67 | 36 | | |
68 | 37 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 38 | + | |
| 39 | + | |
78 | 40 | | |
79 | 41 | | |
80 | 42 | | |
0 commit comments