fix: file rename supports subfolders
trickyni trickyniv56@gmail.com
Tue, 05 May 2026 11:38:21 +0300
1 files changed,
1 insertions(+),
2 deletions(-)
jump to
M
looper.js
→
looper.js
@@ -8,9 +8,8 @@ await emptyDir("out", { recursive: true }); // clears the output folder
await cpy("input/assets", "out", { flat: true }); //copies all the assets into out/ for (const file of await glob("input/content/**/*", { nodir: true })) { - console.log(file); await writeFile( - file.replace("input/content", "out").replace(".md", ".html"), + file.replace(/input\/content[\/\w]*\//, "out/").replace(".md", ".html"), await joinComponents(file), ); }