summaryrefslogtreecommitdiff
path: root/_posts/processPosts.js
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-11-13 20:39:00 -0500
committermattkae <mattkae@protonmail.com>2022-11-13 20:39:00 -0500
commita07e3ba9f28882bc1e22723a5afe0b500e5663f2 (patch)
treec9cd48f099548a24810a8a9ef3a6a2cf03f8a891 /_posts/processPosts.js
parent3ca36d468d1d1fb2aab4f0ed889cd46849d6c272 (diff)
Fix for bad path
Diffstat (limited to '_posts/processPosts.js')
-rw-r--r--_posts/processPosts.js2
1 files changed, 1 insertions, 1 deletions
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,`
<!DOCTYPE html>