summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-10 18:28:28 +0900
committernsfisis <nsfisis@gmail.com>2024-03-10 18:28:28 +0900
commit12402ef175dfb1985f4ce9283269de0c040d890d (patch)
tree09ed9a62d1e9ed9321c6573cdde2e50d1a2ac31e /vhosts/blog/nuldoc-src
parentf7b12852fa8a6f557757dd3482c2b0b3f2aa4e45 (diff)
downloadnsfisis.dev-12402ef175dfb1985f4ce9283269de0c040d890d.tar.gz
nsfisis.dev-12402ef175dfb1985f4ce9283269de0c040d890d.tar.zst
nsfisis.dev-12402ef175dfb1985f4ce9283269de0c040d890d.zip
feat(blog/nuldoc): fill "uuid" field of template files
Diffstat (limited to 'vhosts/blog/nuldoc-src')
-rw-r--r--vhosts/blog/nuldoc-src/commands/new.ts3
1 files changed, 3 insertions, 0 deletions
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"