From 8fb9a93eb4d7ac8a7a8aa18c81922edc348d519c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 10 Mar 2024 18:27:18 +0900 Subject: fix(blog/nuldoc): fix filename of template file for slides --- vhosts/blog/nuldoc-src/commands/new.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vhosts/blog') 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"; } -- cgit v1.2.3-70-g09d2