Further bug fix attempt
This commit is contained in:
parent
8e4e9d1b32
commit
159e64f409
@ -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(' ','--')
|
||||
|
Loading…
Reference in New Issue
Block a user