fix(index): load file path error
This commit is contained in:
parent
cc4ffb4ab7
commit
dc536a3930
1 changed files with 3 additions and 4 deletions
|
|
@ -72,9 +72,8 @@ const mainRender = function (cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// replace route
|
// replace route
|
||||||
route = '/' + route
|
if (OPTIONS.alias && OPTIONS.alias['/' + route]) {
|
||||||
if (OPTIONS.alias && OPTIONS.alias[route]) {
|
route = getAlias('/' + route)
|
||||||
route = getAlias(route)
|
|
||||||
} else {
|
} else {
|
||||||
route = (OPTIONS.basePath + route).replace(/\/+/, '/')
|
route = (OPTIONS.basePath + route).replace(/\/+/, '/')
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +89,7 @@ const mainRender = function (cb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Render Cover page
|
// Render Cover page
|
||||||
if (OPTIONS.coverpage && page === ('/' + OPTIONS.homepage).replace(/\/+/, '/')) {
|
if (OPTIONS.coverpage && page === OPTIONS.homepage) {
|
||||||
utils.load(OPTIONS.coverpage).then(render.renderCover)
|
utils.load(OPTIONS.coverpage).then(render.renderCover)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue