Skip to content

Commit

Permalink
fix(docs.vue): Fix link to edit setup doc (#641)
Browse files Browse the repository at this point in the history
* fix(docs.vue): Fix link to edit setup

Fixes  #639

"Edit this page" link broken for /docs/setup

* fix(docs.vue): Handle edit this page for paths ending in /

* fix(docs.vue): Special case for /docs/contributing
  • Loading branch information
tmorehouse authored and pi0 committed Jul 5, 2017
1 parent 0998df8 commit 836db33
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/nuxt/layouts/docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export default {
let path = this.$route.path;
if (path === '/') {
path = '';
} else if (path === '/docs/setup') {
return base + '/docs/SETUP.md';
} else if (path === '/docs/contributing') {
return base + '/CONTRIBUTING.md';
} else if (/\/$/.test(path)) {
return base + path;
}
return base + path + '/README.md';
},
Expand Down

0 comments on commit 836db33

Please sign in to comment.