fix: homepage link
This commit is contained in:
parent
033be4f2d7
commit
e097f88f0e
2 changed files with 2 additions and 4 deletions
|
|
@ -211,7 +211,7 @@ export class Compiler {
|
||||||
!_self.matchNotCompileLink(href) &&
|
!_self.matchNotCompileLink(href) &&
|
||||||
!config.ignore
|
!config.ignore
|
||||||
) {
|
) {
|
||||||
if (href === _self.config.homepage) href = '/'
|
if (href === _self.config.homepage) href = 'README'
|
||||||
href = router.toURL(href, null, router.getCurrentPath())
|
href = router.toURL(href, null, router.getCurrentPath())
|
||||||
} else {
|
} else {
|
||||||
attrs += ` target="${linkTarget}"`
|
attrs += ` target="${linkTarget}"`
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,7 @@ export class History {
|
||||||
return this.config.basePath
|
return this.config.basePath
|
||||||
}
|
}
|
||||||
|
|
||||||
getFile (path, isRelative) {
|
getFile (path = this.getCurrentPath(), isRelative) {
|
||||||
path = path || this.getCurrentPath()
|
|
||||||
|
|
||||||
const { config } = this
|
const { config } = this
|
||||||
const base = this.getBasePath()
|
const base = this.getBasePath()
|
||||||
const ext = typeof config.ext !== 'string' ? '.md' : config.ext
|
const ext = typeof config.ext !== 'string' ? '.md' : config.ext
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue