summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-03-10 18:27:18 +0900
committernsfisis <nsfisis@gmail.com>2024-03-10 18:27:18 +0900
commit8fb9a93eb4d7ac8a7a8aa18c81922edc348d519c (patch)
treee1766ddb97dce2d692703cf5eb5f2300f52ca7e0
parent74fb8b04f9ef22e3d3ceaa139f2ace03df6a5ae0 (diff)
downloadnsfisis.dev-8fb9a93eb4d7ac8a7a8aa18c81922edc348d519c.tar.gz
nsfisis.dev-8fb9a93eb4d7ac8a7a8aa18c81922edc348d519c.tar.zst
nsfisis.dev-8fb9a93eb4d7ac8a7a8aa18c81922edc348d519c.zip
fix(blog/nuldoc): fix filename of template file for slides
-rw-r--r--vhosts/blog/nuldoc-src/commands/new.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/vhosts/blog/nuldoc-src/commands/new.ts b/vhosts/blog/nuldoc-src/commands/new.ts
index d1fc9ad3..db1faf72 100644
--- a/vhosts/blog/nuldoc-src/commands/new.ts
+++ b/vhosts/blog/nuldoc-src/commands/new.ts
@@ -21,7 +21,7 @@ export async function runNewCommand(config: Config) {
config.locations.contentDir,
getDirPath(type),
ymd,
- "TODO.ndoc",
+ getFilename(type),
);
await ensureDir(dirname(destFilePath));
@@ -33,6 +33,10 @@ export async function runNewCommand(config: Config) {
);
}
+function getFilename(type: "post" | "slide"): string {
+ return type === "post" ? "TODO.ndoc" : "TODO.toml";
+}
+
function getDirPath(type: "post" | "slide"): string {
return type === "post" ? "posts" : "slides";
}