fix(art): give both 2026-10-20 posts their artwork, and gate the build on it
Deploy / build (push) Successful in 34s
Deploy / build (push) Successful in 34s
The YuE2 and subtitles posts shipped text-only: render_from_art.mjs only READS ogImage/banner, and after the 2026-10-19 bulk migration no script had to write them, so both pages advertised /og-default.jpg and rendered no hero banner. - new metaphors (in build_captions.py, frozen here via sync_prompts_catalog.py), captions, art-meta evidence, banner plan and the five derived files per slug - frontmatter: ogImage + banner in EN and ZH for both posts - scripts/check-assets.mjs is now step 1 of npm run build, so CI fails when a published post lacks a language-correct og card, banner, banner .webp or 400/800 list thumb. It reported 16 problems on the unfixed tree, all here.
This commit is contained in:
1 parent
557f312bc7
commit
0dae8b0daa
26 files changed
+229
-2
No files matched your search
@@ -258,8 +258,15 @@ No topics were killed by the user in this sweep.
|
||||
- Verified with headless Chrome by injecting the built `<section class="related">` + built CSS into a probe at 1264 / 884 / 500 px: `gridTemplateColumns` = 3 / 2 / 2 columns, visible cards 6 / 6 / 4, `scrollWidth == clientWidth` everywhere (no overflow), 6/6 images decoded.
|
||||
- ⚠ Headless `--window-size=390` is silently clamped to **500** on Windows — the right-hand column looks clipped in the screenshot, but that is the capture, not the layout. Verify <500px by putting the probe in a 390px `<iframe>` and screenshotting that.
|
||||
- ⚠ `--virtual-time-budget` can expire before lazy images paint (5 of 6 cards came out as empty `var(--border)` rectangles at budget 6000). Use ≥20000 before declaring an image broken.
|
||||
- **Tag pages now carry the same chrome as `/posts/`** (`/tags/<tag>/` and `/zh/tags/<tag>/` used to pass `chrome={false}` and show only a count line): the title/tag filter input, the category chips and the tag-chip strip. Category chips and the row filter stay scoped to the posts on the page, so their counts match the rows; the tag strip is built from the whole language collection (`chipPosts`) because those chips *navigate* — page-scoped counts there would lie — and the tag being viewed gets `is-active` + `aria-current`. Measured at 1264/500px: gaps 8px/22px between bar → category chips → tag chips → list, `scrollWidth < clientWidth`, 14 tag chips, 4 category chips on /tags/docker/.
|
||||
- Bytes: 6 × ~65 KB JPEG ≈ 390 KB, `loading="lazy"` and below the fold. The `/og/thumb/` WebPs (5.8 / 16.1 KB) are keyed by base slug with **no ZH variant**, so they cannot be used here without first emitting `/og/thumb/zh-<slug>-{400,800}.webp`.
|
||||
|
||||
### Phase H — Two posts shipped without art (2026-10-20), and the gate that stops it recurring
|
||||
- ⚠ **Cause**: the two posts from 2026-10-20 (`yue2-on-a-12gb-gpu-songs-that-lost-their-endings`, `generating-subtitles-for-songs-without-timestamps`, EN+ZH) were published text-complete only. `render_from_art.mjs` **reads** `ogImage`/`banner` but nothing **writes** them, and after the 2026-10-19 bulk migration no script had to — so both pages advertised `/og-default.jpg` (generic card in every share preview and in the new related grid) and rendered no hero banner. The pipeline itself was fine and up to date: `python scripts/og-gen/sync_prompts_catalog.py --check` named exactly these two slugs (`missing=[...]`, 73 metaphors vs 75 posts), which is the check nobody ran before pushing.
|
||||
- ✅ Art generated with the current one-command flow (`C:/AI/ideogram4/post_art.py --slug … --metaphor … --evidence …`), same v2 semantic style as the other 73: no-text 1360×768 frame → 1600×900 banner (jpg+webp) → EN card → ZH card → 400/800 thumbs.
|
||||
- ✅ **New gate**: `scripts/check-assets.mjs` runs as step 1 of `npm run build`, so a post that is text-complete but not image-complete now fails the Gitea Actions build instead of reaching nginx. It checks, per published post: `ogImage` present and language-correct (EN `/og/<slug>.jpg`, ZH `/og/zh-<slug>.jpg`), `banner` present (`/banners/<slug>.jpg`, shared by both languages), and the existence of banner `.jpg` + `.webp` + `-400` + `-800` thumbs. First run against the unfixed tree reported 16 problems, all on these two slugs and nothing else — it catches this bug class and is silent on the other 73 posts.
|
||||
- Frontmatter for the two posts now carries all four fields; nothing else about the posts changed.
|
||||
|
||||
### Phase A — Identity (DONE)
|
||||
- ✅ Real headshot in the About hero, the author card on every post, the home hero (EN + ZH) and JSON-LD `Person.image`; no 404 for any derivative.
|
||||
- ✅ One branding line ("Full-Stack Developer & DevOps Engineer") aligned across `SITE.title`, meta description, JSON-LD and the homepage hero.
|
||||
|
||||
Reference in new issue
Block a user