feat: enforce real imagery for news002
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -98,9 +98,12 @@ CSS 固化在 `NEWS002_STYLE_BLOCK`,直接内嵌进 taskSpec,Agent 照抄即
|
||||
| 日期行 | `.date-badge` | `.masthead .meta` |
|
||||
| 导语 | `.subtitle` | `.lede` |
|
||||
|
||||
**已知缺口**:news002 的 per-card 配图目前不会上传到微信正文。
|
||||
`uploadDailyNewsBodyImagesForWechat()` 只处理页面里已有的 `<img>`,而 inline 渲染的
|
||||
`renderListCard` / `renderFeatureCard` 不输出图片。公众号侧配图需要单独一轮改造。
|
||||
news002 的卡片图会先上传到微信正文素材接口,再由 inline 渲染器输出微信 CDN 地址。
|
||||
任一新闻卡缺少真实同源图片、图片上传失败、头条不是 3~4 条、事件卡超过 28 条,
|
||||
或页面仍混有 news001 DOM,都会由生成/推送闸门阻断,不允许进入草稿箱。
|
||||
|
||||
真实图片来源按优先级取文章来源的 `og:image:secure_url`、`og:image`、
|
||||
`twitter:image`;不使用与事件无法核验关系的泛图片搜索结果。
|
||||
|
||||
## 预览与验证
|
||||
|
||||
@@ -108,8 +111,12 @@ CSS 固化在 `NEWS002_STYLE_BLOCK`,直接内嵌进 taskSpec,Agent 照抄即
|
||||
# 渲染一张 news002 静态预览页(样例数据,占位图)
|
||||
node scripts/preview-news002-template.mjs /tmp/news002-preview.html
|
||||
|
||||
# 用当天真实新闻 + 对应文章来源图片生成视觉样图(不推微信、不写生产目录)
|
||||
node scripts/build-news002-real-design-sample.mjs
|
||||
|
||||
# 相关单测
|
||||
node --test news-morning-templates.test.mjs \
|
||||
wechat-news-morning-images.test.mjs \
|
||||
wechat-news-morning-dedup.test.mjs \
|
||||
wechat-news-morning-draft.test.mjs \
|
||||
wechat-news-morning-draft-worker.test.mjs \
|
||||
|
||||
Reference in New Issue
Block a user