diff --git a/lib/default-theme/Page.vue b/lib/default-theme/Page.vue index ea03b3ff19..36f0538715 100644 --- a/lib/default-theme/Page.vue +++ b/lib/default-theme/Page.vue @@ -76,8 +76,8 @@ export default { : `https://github.com/${docsRepo}` return ( base.replace(endingSlashRE, '') + - `/edit/${docsBranch}/` + - docsDir.replace(endingSlashRE, '') + + `/edit/${docsBranch}` + + (docsDir ? '/' + docsDir.replace(endingSlashRE, '') : '') + path ) }