Further bug fix attempt

This commit is contained in:
Tuan Cao 2022-04-18 08:41:57 +07:00
parent 8e4e9d1b32
commit 159e64f409

View File

@ -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(' ','--')