Skip to content

Commit 4d842d1

Browse files
committed
fix: priview folder path
1 parent 1034e40 commit 4d842d1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/server/app.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default class App {
218218
// Site folder exists
219219
if (fse.pathExistsSync(this.appDir)) {
220220
// Check if the `images`, `config`, 'output', `post-images`, 'posts', 'themes', 'static' folder exists, if it does not exist, copy it from default-files
221-
['images', 'config', 'output', 'post-images', 'posts', 'themes', 'static'].forEach((folder: string) => {
221+
['images', 'config', 'post-images', 'posts', 'themes', 'static'].forEach((folder: string) => {
222222
const folderPath = path.join(this.appDir, folder)
223223
if (!fse.pathExistsSync(folderPath)) {
224224
fse.copySync(
@@ -235,7 +235,7 @@ export default class App {
235235
this.checkTheme('paper')
236236

237237
// move output/favicon.ico to Gridea/favicon.ico
238-
const outputFavicon = path.join(this.appDir, 'output', 'favicon.ico')
238+
const outputFavicon = path.join(this.buildDir, 'favicon.ico')
239239
const sourceFavicon = path.join(this.appDir, 'favicon.ico')
240240
const existFaviconOutput = fse.pathExistsSync(outputFavicon)
241241
const existFaviconSource = fse.pathExistsSync(sourceFavicon)
@@ -288,8 +288,8 @@ export default class App {
288288
const routesStack = routers.stack
289289
routesStack.forEach(removeMiddleware)
290290
}
291-
this.previewServer.use(express.static(`${this.appDir}/output`))
292-
console.log(`Preview server: Static dir change to ${this.appDir}/output`)
291+
this.previewServer.use(express.static(`${this.buildDir}`))
292+
console.log(`Preview server: Static dir change to ${this.buildDir}`)
293293
}
294294

295295
private initEvents(): void {

src/server/plugins/deploys/sftp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class SftpDeploy extends Model {
109109
connectConfig.password = setting.password
110110
}
111111

112-
const localPath = normalizePath(path.join(this.appDir, 'output'))
112+
const localPath = normalizePath(path.join(this.buildDir))
113113
const remotePath = normalizePath(path.join(setting.remotePath))
114114

115115
try {

src/server/renderer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default class Renderer extends Model {
8585
async loadConfig() {
8686
this.themePath = urlJoin(this.appDir, 'themes', this.db.themeConfig.themeName)
8787

88-
fse.ensureDirSync(urlJoin(this.appDir, 'output'))
88+
fse.ensureDirSync(urlJoin(this.outputDir))
8989
}
9090

9191
/**

0 commit comments

Comments
 (0)