feat(posts): publish batch-06 posts 01 & 02, render full visual asset suites for all 5 posts

This commit is contained in:
hoelee committed 2026-10-27 22:30:31 +08:00
1 parent c51885d00a
commit 8a581dc68b
42 files changed
+93 -4

No files matched your search

+25
View File
@@ -296,5 +296,30 @@
},
"generating-full-length-songs-with-yue2-comfyui": {
"evidence": "60 songs - 9-part structure - 295s headroom cap"
},
"when-lowering-crf-does-nothing-maxrate-deadlock": {
"evidence": "CRF 19→14 · SSIM +0.00003 · 106.2h wasted",
"ogTitle_en": "When Lowering CRF Does Nothing",
"ogTitle_zh": "降低 CRF 为何毫无效果:maxrate 死锁"
},
"why-ffmpeg-map-0-breaks-your-mp4-and-mkv-remux": {
"evidence": "-map 0 copy · tx3g CC · udta/name dual-write",
"ogTitle_en": "Why ffmpeg -map 0 Breaks Remux",
"ogTitle_zh": "ffmpeg -map 0 搞崩跨容器混流"
},
"traefik-yaegi-plugin-package-name-trap": {
"evidence": "Yaegi lookup · hyphen to underscore · panic",
"ogTitle_en": "Traefik Yaegi Plugin Package Trap",
"ogTitle_zh": "Traefik Yaegi 插件启动崩溃陷阱"
},
"architecting-sea-payment-and-offline-licensing-pipelines": {
"evidence": "toyyibPay FPX · FOR UPDATE · Ed25519 offline",
"ogTitle_en": "SEA Payment & Offline Licensing",
"ogTitle_zh": "东南亚网银支付与离线机器码授权"
},
"batch-generating-80-technical-covers-with-comfyui": {
"evidence": "89 covers in 48m · 35% safe zone · Laplacian filter",
"ogTitle_en": "Batch Generating 80+ Technical Covers",
"ogTitle_zh": "ComfyUI 批量闭环 80+ 张技术封面"
}
}
+44
View File
@@ -0,0 +1,44 @@
import os
import re
repo = "D:/dev/hoelee-blog"
posts_dir = os.path.join(repo, "src/content/posts")
slugs = [
("when-lowering-crf-does-nothing-maxrate-deadlock", False),
("why-ffmpeg-map-0-breaks-your-mp4-and-mkv-remux", False),
("traefik-yaegi-plugin-package-name-trap", True),
("architecting-sea-payment-and-offline-licensing-pipelines", True),
("batch-generating-80-technical-covers-with-comfyui", True)
]
for slug, is_draft in slugs:
en_path = os.path.join(posts_dir, f"{slug}.md")
zh_path = os.path.join(posts_dir, "zh", f"{slug}.md")
draft_val = "true" if is_draft else "false"
# Process EN
with open(en_path, "r", encoding="utf-8") as f:
en_text = f.read()
en_text = re.sub(r"^draft:\s*(true|false)", f"draft: {draft_val}", en_text, flags=re.MULTILINE)
if "ogImage:" not in en_text:
en_text = re.sub(r"^---\r?\n", f"---\nogImage: \"/og/{slug}.jpg\"\nbanner: \"/banners/{slug}.jpg\"\n", en_text)
with open(en_path, "w", encoding="utf-8") as f:
f.write(en_text)
# Process ZH
with open(zh_path, "r", encoding="utf-8") as f:
zh_text = f.read()
zh_text = re.sub(r"^draft:\s*(true|false)", f"draft: {draft_val}", zh_text, flags=re.MULTILINE)
if "ogImage:" not in zh_text:
zh_text = re.sub(r"^---\r?\n", f"---\nogImage: \"/og/zh-{slug}.jpg\"\nbanner: \"/banners/{slug}.jpg\"\n", zh_text)
with open(zh_path, "w", encoding="utf-8") as f:
f.write(zh_text)
print("Frontmatter updated successfully.")