등록 화면: 작품 목록(썸네일·미발행 표시), 저장 후 목록 복귀, 사이트에 올리기 버튼, dist 미리보기(/p, /preview)

This commit is contained in:
한땀 작업실 committed 2026-11-01 04:22:36 +00:00
1 parent b604bfe047
commit b887c98d5f
3 files changed
+126 -23

No files matched your search

+7 -6
View File
@@ -346,14 +346,15 @@ def _to_jpeg(source: Path, target: Path, limit: int = 1400) -> None:
def _other_drafts(slug: str) -> List[str]:
"""커밋되지 않은 다른 작품 초안. 배포하면 함께 올라가므로 미리 알린다."""
return [name for name in pending_drafts() if not name.endswith(f"/{slug}")]
def pending_drafts() -> List[str]:
"""커밋되지 않은 작품 초안 전체(경로 기준)."""
proc = subprocess.run(["git", "status", "--porcelain", "--", "content/products"],
cwd=str(ROOT), capture_output=True, text=True, timeout=30)
names: List[str] = []
for line in (proc.stdout or "").splitlines():
path = line[3:].strip()
if path.endswith(".md") and not path.endswith(f"/{slug}.md"):
names.append(Path(path).stem)
return names
return [Path(line[3:].strip()).stem for line in (proc.stdout or "").splitlines()
if line[3:].strip().endswith(".md")]
def publish(payload: Dict[str, Any], helpers: Dict[str, Any]) -> Dict[str, Any]: