mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-23 12:56:53 +08:00
committed by
cinwell.li
parent
94bc415534
commit
0a0802aded
@@ -232,7 +232,13 @@ export function initRender(vm) {
|
||||
}
|
||||
|
||||
if (config.logo) {
|
||||
config.logo = getPath(vm.router.getBasePath(), config.logo)
|
||||
const isBase64 = /^data:image/.test(config.logo)
|
||||
const isExternal = /(?:http[s]?:)?\/\//.test(config.logo)
|
||||
const isRelative = /^\./.test(config.logo)
|
||||
|
||||
if (!isBase64 && !isExternal && !isRelative) {
|
||||
config.logo = getPath(vm.router.getBasePath(), config.logo)
|
||||
}
|
||||
}
|
||||
|
||||
html += tpl.main(config)
|
||||
|
||||
Reference in New Issue
Block a user