From 159e64f409d74c8fc07d5150bc62a99364866c33 Mon Sep 17 00:00:00 2001 From: Tuan Cao Date: Mon, 18 Apr 2022 08:41:57 +0700 Subject: [PATCH] Further bug fix attempt --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index d83e68d..a75d261 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -76,7 +76,7 @@ export function toFilePath(slug) { export function toSlug(filePath) { - if (Node.isFile(filePath)) { + if (Node.isFile(filePath) && filePath.includes(postsDirectory)) { return filePath.replace(postsDirectory, '') .replaceAll('/','__') .replaceAll(' ','--')