From a07e3ba9f28882bc1e22723a5afe0b500e5663f2 Mon Sep 17 00:00:00 2001 From: mattkae Date: Sun, 13 Nov 2022 20:39:00 -0500 Subject: Fix for bad path --- _posts/processPosts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '_posts/processPosts.js') diff --git a/_posts/processPosts.js b/_posts/processPosts.js index 55c97df..d4b2a2e 100644 --- a/_posts/processPosts.js +++ b/_posts/processPosts.js @@ -47,7 +47,7 @@ function createPostServableFile(post) { const baseFilePath = path.join(__dirname, '..', post.url); const stats = fs.statSync(baseFilePath); const content = fs.readFileSync(baseFilePath); - const fileName = post.url.substring(post.url.lastIndexOf('/')); + const fileName = post.url.substring(post.url.lastIndexOf('/') + 1); const filePath = path.join(dir, fileName); fs.writeFileSync(filePath,` -- cgit v1.2.1