Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 68bbac4

Browse files
authoredMar 24, 2025··
Update algolia-index.js
1 parent 6296bab commit 68bbac4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
 

‎js/algolia-index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ const startIndexing = (currentBranch) => {
8585
}
8686
fileData.forEach((targetFile) => {
8787
const targetFilePath = path.join(targetPath, targetFile);
88-
beforeUpload(targetFilePath, targetFile);
88+
beforeUpload(targetFilePath, targetFile, algoliaIndex);
8989
});
9090
});
9191
}
92-
beforeUpload(targetPath, target);
92+
beforeUpload(targetPath, target, algoliaIndex);
9393
});
9494
});
9595
});
@@ -98,7 +98,7 @@ const startIndexing = (currentBranch) => {
9898
});
9999
};
100100

101-
function beforeUpload(targetPath, target) {
101+
function beforeUpload(targetPath, target, algoliaIndex) {
102102
const stat = fs.lstatSync(targetPath);
103103
if (stat.isFile() && path.extname(target) === ".adoc") {
104104
fs.readFile(targetPath, "utf-8", (err, data) => {
@@ -128,12 +128,12 @@ function beforeUpload(targetPath, target) {
128128
title: title,
129129
content: text,
130130
};
131-
uploadFile(recode, targetPath);
131+
uploadFile(recode, targetPath, algoliaIndex);
132132
});
133133
}
134134
}
135135

136-
function uploadFile(file, targetPath) {
136+
function uploadFile(file, targetPath, algoliaIndex) {
137137
const url = targetPath
138138
.split("modules")[1]
139139
.replace("/pages", "")

0 commit comments

Comments
 (0)
Please sign in to comment.