mirror of
https://github.com/docsifyjs/docsify.git
synced 2026-01-25 15:23:21 +00:00
fix(index): load file path error
This commit is contained in:
parent
cc4ffb4ab7
commit
dc536a3930
@ -72,9 +72,8 @@ const mainRender = function (cb) {
|
||||
}
|
||||
|
||||
// replace route
|
||||
route = '/' + route
|
||||
if (OPTIONS.alias && OPTIONS.alias[route]) {
|
||||
route = getAlias(route)
|
||||
if (OPTIONS.alias && OPTIONS.alias['/' + route]) {
|
||||
route = getAlias('/' + route)
|
||||
} else {
|
||||
route = (OPTIONS.basePath + route).replace(/\/+/, '/')
|
||||
}
|
||||
@ -90,7 +89,7 @@ const mainRender = function (cb) {
|
||||
}
|
||||
|
||||
// Render Cover page
|
||||
if (OPTIONS.coverpage && page === ('/' + OPTIONS.homepage).replace(/\/+/, '/')) {
|
||||
if (OPTIONS.coverpage && page === OPTIONS.homepage) {
|
||||
utils.load(OPTIONS.coverpage).then(render.renderCover)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user