From 12402ef175dfb1985f4ce9283269de0c040d890d Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 10 Mar 2024 18:28:28 +0900 Subject: feat(blog/nuldoc): fill "uuid" field of template files --- vhosts/blog/nuldoc-src/commands/new.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vhosts/blog/nuldoc-src/commands') diff --git a/vhosts/blog/nuldoc-src/commands/new.ts b/vhosts/blog/nuldoc-src/commands/new.ts index 19002531..13735f0b 100644 --- a/vhosts/blog/nuldoc-src/commands/new.ts +++ b/vhosts/blog/nuldoc-src/commands/new.ts @@ -58,9 +58,11 @@ function getDirPath(type: "post" | "slide"): string { } function getTemplate(type: "post" | "slide", date: string): string { + const uuid = crypto.randomUUID(); if (type === "post") { return `--- [article] +uuid = "${uuid}" title = "TODO" description = "TODO" tags = [ @@ -82,6 +84,7 @@ remark = "公開" `; } else { return `[slide] +uuid = "${uuid}" title = "TODO" event = "TODO" talkType = "TODO" -- cgit v1.2.3-70-g09d2