diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-03-10 18:27:18 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-03-10 18:27:18 +0900 |
| commit | 8fb9a93eb4d7ac8a7a8aa18c81922edc348d519c (patch) | |
| tree | e1766ddb97dce2d692703cf5eb5f2300f52ca7e0 | |
| parent | 74fb8b04f9ef22e3d3ceaa139f2ace03df6a5ae0 (diff) | |
| download | nsfisis.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.ts | 6 |
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"; } |
