작품 파일명 연-월-제목 + 작품별 이미지 폴더(assets/img/<slug>/)

This commit is contained in:
koreafood committed 2026-10-31 11:18:55 +09:00
1 parent 4dff91b483
commit 767b2a30a3
19 files changed
+163 -40

No files matched your search

+3 -3
View File
@@ -9,7 +9,7 @@ from pathlib import Path
BASE = "http://127.0.0.1:8081"
ROOT = Path.home() / "Projects/teamat"
SLUG = "whitework-tea-mat"
SLUG = "2026-10-whitework-tea-mat"
MD = ROOT / "content/products" / f"{SLUG}.md"
fails = []
@@ -66,7 +66,7 @@ check("무변경 저장은 커밋 안 함", data["ok"] and data["changed"] is Fa
fields = dict(fields0)
fields["subtitle"] = "스모크 테스트 부제"
fields["price"] = "59000"
fields["gallery"] = "assets/img/work-whitework.jpg"
fields["gallery"] = "assets/img/2026-10-whitework-tea-mat/cover.jpg"
code, data = req("/api/product", {"slug": SLUG, "fields": fields, "body": body0})
check("수정 저장 성공", data["ok"] and data.get("changed") is True, json.dumps(data)[:300])
sha = data.get("head", "")
@@ -75,7 +75,7 @@ check("HEAD 이동", sha != head0, f"{head0} -> {sha}")
text = MD.read_text(encoding="utf-8")
check("파일 반영(subtitle)", "subtitle: 스모크 테스트 부제" in text)
check("파일 반영(price 정수)", "price: 59000" in text, text[:400])
check("목록 형식 유지(gallery)", "gallery:\n- assets/img/work-whitework.jpg" in text, text[:600])
check("목록 형식 유지(gallery)", "gallery:\n- assets/img/2026-10-whitework-tea-mat/cover.jpg" in text, text[:600])
check("front matter 순서 유지", text.splitlines()[1].startswith("slug:"), text.splitlines()[1])
code, data = req("/api/history")