Skip to content

Commit 44ac246

Browse files
Fix support for deeper structure in folder parameter (#17)
* 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.
1 parent 061a612 commit 44ac246

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ async function main() {
7878
for (const f of files) {
7979
let path = f.join("/");
8080
let currentParentPageId = rootParentPageId;
81+
let pathsInRoot = root.split("/");
82+
let newRoot= root;
83+
if(pathsInRoot.length > 1){
84+
newRoot = pathsInRoot[0] + "/"
85+
console.log("Root for action includes subfolder. Assigning root as: " + newRoot)
86+
}
8187
for (const subPath of f) {
8288
if (subPath.includes(".md")) {
8389
let pageTitle = subPath.replace(".md", "");

0 commit comments

Comments
 (0)