summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/commands/new.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vhosts/blog/nuldoc-src/commands/new.ts')
-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";
}