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 +- posts.html | 2 +- posts/tag_[object Object].html | 36 ------------------------------------ posts/tag_personal.html | 2 +- 4 files changed, 3 insertions(+), 39 deletions(-) delete mode 100644 posts/tag_[object Object].html 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,` diff --git a/posts.html b/posts.html index 3f75430..14a691c 100644 --- a/posts.html +++ b/posts.html @@ -36,7 +36,7 @@

Posts

diff --git a/posts/tag_[object Object].html b/posts/tag_[object Object].html deleted file mode 100644 index 1999d78..0000000 --- a/posts/tag_[object Object].html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - Matthew Kosarek - - - -
-

Matthew Kosarek

- -
- - - -
-

Posts

- -
- - diff --git a/posts/tag_personal.html b/posts/tag_personal.html index 1999d78..801fd7c 100644 --- a/posts/tag_personal.html +++ b/posts/tag_personal.html @@ -28,7 +28,7 @@

Posts

-- cgit v1.2.1