0041
This commit is contained in:
1 parent
7b3173e89d
commit
b8d16016d8
8 files changed
+39
-14
No files matched your search
@@ -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>();
|
||||
|
||||
Reference in new issue
Block a user