Skip to content

feat: Add docsRepo #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Apr 23, 2018
10 changes: 5 additions & 5 deletions lib/default-theme/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
},
editLink () {
const {
repo,
docsRepo,
editLinks,
docsDir = '',
docsBranch = 'master'
Expand All @@ -65,10 +65,10 @@ export default {
path += '.md'
}

if (repo && editLinks) {
const base = outboundRE.test(repo)
? repo
: `https://github.com/${repo}`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it just work for github?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can take a full URL to handle repositories

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it was preserved, I just changed the var name from repo to docsRepo.

if (docsRepo && editLinks) {
const base = outboundRE.test(docsRepo)
? docsRepo
: `https://github.com/${docsRepo}`
return (
base.replace(endingSlashRE, '') +
`/edit/${docsBranch}/` +
Expand Down