Skip to content

Commit 736d1da

Browse files
Feat/support sub folders (#18)
* Fix logic when using subfolder paths in folder input (i.e docs/MySubsection) avoding incorrect path (root+path) when creating markdown * Commit after npm run build * Revert "Commit after npm run build" This reverts commit d13e9cc. * Commit fix after run with as real use case * Commit fix after run with as real use case
1 parent e0c918c commit 736d1da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ async function main() {
8080
let currentParentPageId = rootParentPageId;
8181
let pathsInRoot = root.split("/");
8282
let newRoot= root;
83-
if(pathsInRoot.length > 1){
84-
newRoot = pathsInRoot[0] + "/"
85-
console.log("Root for action includes subfolder. Assigning root as: " + newRoot)
83+
if(pathsInRoot.length > 2){
84+
newRoot = "./" + pathsInRoot[1] + "/"
85+
console.log("Root for action includes subfolder. Assigning root as: " + newRoot)
8686
}
8787
for (const subPath of f) {
8888
if (subPath.includes(".md")) {

0 commit comments

Comments
 (0)