|
|
|
|
@ -301,7 +301,7 @@ module.exports = {
|
|
|
|
|
fileName = `${page.localeCode}/${fileName}`
|
|
|
|
|
}
|
|
|
|
|
const filePath = path.join(this.repoPath, fileName)
|
|
|
|
|
await fs.outputFile(filePath, page.injectMetadata(), 'utf8')
|
|
|
|
|
await fs.outputFile(filePath, page.storageContent(), 'utf8')
|
|
|
|
|
|
|
|
|
|
const gitFilePath = `./${fileName}`
|
|
|
|
|
if ((await this.git.checkIgnore(gitFilePath)).length === 0) {
|
|
|
|
|
@ -323,7 +323,7 @@ module.exports = {
|
|
|
|
|
fileName = `${page.localeCode}/${fileName}`
|
|
|
|
|
}
|
|
|
|
|
const filePath = path.join(this.repoPath, fileName)
|
|
|
|
|
await fs.outputFile(filePath, page.injectMetadata(), 'utf8')
|
|
|
|
|
await fs.outputFile(filePath, page.storageContent(), 'utf8')
|
|
|
|
|
|
|
|
|
|
const gitFilePath = `./${fileName}`
|
|
|
|
|
if ((await this.git.checkIgnore(gitFilePath)).length === 0) {
|
|
|
|
|
@ -487,7 +487,7 @@ module.exports = {
|
|
|
|
|
}
|
|
|
|
|
WIKI.logger.info(`(STORAGE/GIT) Adding page ${fileName}...`)
|
|
|
|
|
const filePath = path.join(this.repoPath, fileName)
|
|
|
|
|
await fs.outputFile(filePath, pageHelper.injectPageMetadata(page), 'utf8')
|
|
|
|
|
await fs.outputFile(filePath, page.storageContent(), 'utf8')
|
|
|
|
|
await this.git.add(`./${fileName}`)
|
|
|
|
|
cb()
|
|
|
|
|
}
|
|
|
|
|
|