This commit is contained in:
Vaica committed 2026-06-22 00:41:05 +08:00
1 parent 7b3173e89d
commit b8d16016d8
8 files changed
+39 -14

No files matched your search

+3 -1
View File
@@ -23,7 +23,9 @@ function computeDirPath(title: string, date?: string): string {
.replace(/[^\w一-鿿㐀-䶿]+/g, "-")
.replace(/^-+|-+$/g, "")
.toLowerCase() || "post";
return path.join(CONTENT_DIR, year, `${dateStr}-${titlePart}`);
// 加时间戳避免同标题同天冲突
const ts = Date.now().toString(36);
return path.join(CONTENT_DIR, year, `${dateStr}-${titlePart}-${ts}`);
}
const sessions = new Map<number, Session>();