diff --git a/src/core/render/compiler.js b/src/core/render/compiler.js index 35381edaa..f632dd17a 100644 --- a/src/core/render/compiler.js +++ b/src/core/render/compiler.js @@ -211,7 +211,7 @@ export class Compiler { !_self.matchNotCompileLink(href) && !config.ignore ) { - if (href === _self.config.homepage) href = '/' + if (href === _self.config.homepage) href = 'README' href = router.toURL(href, null, router.getCurrentPath()) } else { attrs += ` target="${linkTarget}"` diff --git a/src/core/router/history/base.js b/src/core/router/history/base.js index 0a0ccd357..e3e11227e 100644 --- a/src/core/router/history/base.js +++ b/src/core/router/history/base.js @@ -35,9 +35,7 @@ export class History { return this.config.basePath } - getFile (path, isRelative) { - path = path || this.getCurrentPath() - + getFile (path = this.getCurrentPath(), isRelative) { const { config } = this const base = this.getBasePath() const ext = typeof config.ext !== 'string' ? '.md' : config.ext