mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix typos in generator
This commit is contained in:
parent
6234ae84c0
commit
efd7c1b4d1
@ -247,18 +247,17 @@ export default class Generator {
|
||||
}
|
||||
}
|
||||
|
||||
let path
|
||||
let _path
|
||||
|
||||
if (this.options.generate.subFolders) {
|
||||
path = path.join(route, path.sep, 'index.html') // /about -> /about/index.html
|
||||
path = path === '/404/index.html' ? '/404.html' : path // /404 -> /404.html
|
||||
_path = path.join(route, path.sep, 'index.html') // /about -> /about/index.html
|
||||
_path = _path === '/404/index.html' ? '/404.html' : _path // /404 -> /404.html
|
||||
} else {
|
||||
path =
|
||||
route.length > 1 ? path.join(path.sep, route + '.html') : path.join(path.sep, 'index.html')
|
||||
_path = route.length > 1 ? path.join(path.sep, route + '.html') : path.join(path.sep, 'index.html')
|
||||
}
|
||||
|
||||
// Call hook to let user update the path & html
|
||||
const page = { route, path, html }
|
||||
const page = { route, path: _path, html }
|
||||
await this.nuxt.callHook('generate:page', page)
|
||||
|
||||
page.path = path.join(this.distPath, page.path)
|
||||
|
Loading…
Reference in New Issue
Block a user