@@ -85,11 +85,11 @@ const startIndexing = (currentBranch) => {
85
85
}
86
86
fileData . forEach ( ( targetFile ) => {
87
87
const targetFilePath = path . join ( targetPath , targetFile ) ;
88
- beforeUpload ( targetFilePath , targetFile ) ;
88
+ beforeUpload ( targetFilePath , targetFile , algoliaIndex ) ;
89
89
} ) ;
90
90
} ) ;
91
91
}
92
- beforeUpload ( targetPath , target ) ;
92
+ beforeUpload ( targetPath , target , algoliaIndex ) ;
93
93
} ) ;
94
94
} ) ;
95
95
} ) ;
@@ -98,7 +98,7 @@ const startIndexing = (currentBranch) => {
98
98
} ) ;
99
99
} ;
100
100
101
- function beforeUpload ( targetPath , target ) {
101
+ function beforeUpload ( targetPath , target , algoliaIndex ) {
102
102
const stat = fs . lstatSync ( targetPath ) ;
103
103
if ( stat . isFile ( ) && path . extname ( target ) === ".adoc" ) {
104
104
fs . readFile ( targetPath , "utf-8" , ( err , data ) => {
@@ -128,12 +128,12 @@ function beforeUpload(targetPath, target) {
128
128
title : title ,
129
129
content : text ,
130
130
} ;
131
- uploadFile ( recode , targetPath ) ;
131
+ uploadFile ( recode , targetPath , algoliaIndex ) ;
132
132
} ) ;
133
133
}
134
134
}
135
135
136
- function uploadFile ( file , targetPath ) {
136
+ function uploadFile ( file , targetPath , algoliaIndex ) {
137
137
const url = targetPath
138
138
. split ( "modules" ) [ 1 ]
139
139
. replace ( "/pages" , "" )
0 commit comments