Skip to content

Commit a56e760

Browse files
authored
fix: properly compute the path to source images (#446)
1 parent ed4d07b commit a56e760

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

.build/utils/modular-docs.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,9 @@ function generateSplitterInput(dir) {
8181

8282
readmes.forEach(p => {
8383
const id = path.dirname(p).replace(/\//g, '-');
84-
console.info("id", id)
8584
const destFilename = `chap-${id}.adoc`;
8685
const srcFilePath = path.join(dir, p);
87-
const srcImagesDir = path.join(dir, id, "images");
86+
const srcImagesDir = path.join(srcFilePath.substring(0, srcFilePath.lastIndexOf("/")), "images");
8887
const destFilePath = path.join(destDir, destFilename);
8988
const destImagesDir = path.join(destDir, "_images", id);
9089
let data = fs.readFileSync(srcFilePath, "utf-8").toString();

0 commit comments

Comments
 (0)