From f18b07fa41c2834ff1b219b3922df9725d1e499d Mon Sep 17 00:00:00 2001 From: "Jocelyn Badgley (Twipped)" Date: Tue, 7 Apr 2020 10:41:13 -0700 Subject: [PATCH] Fix new-post glitch --- build/new-post.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/new-post.js b/build/new-post.js index 8dc7a30..7ac4145 100644 --- a/build/new-post.js +++ b/build/new-post.js @@ -19,7 +19,7 @@ module.exports = exports = async function newPost () { } // console.log(date);return; - var id = random.id(6).toUpperCase(); + var id = random.id(10).toUpperCase(); var fname = format(date, 'yyyy-MM-dd.HHmm.') + id; var target = resolve('posts', fname); @@ -29,7 +29,7 @@ module.exports = exports = async function newPost () { target += '.md'; } else { await fs.ensureDir(target); - target += path.join(target, 'index.md'); + target = path.join(target, 'index.md'); } await fs.writeFile(target, contents);