Skip to content

Commit

Permalink
fix: links from github
Browse files Browse the repository at this point in the history
  • Loading branch information
LuXDAmore committed Mar 21, 2020
1 parent f2b7632 commit 1cc9cf9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions example/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,25 @@
links[ i ].textContent,
);
const REDIRECT_TO_GITHUB = links[ i ].href.startWith(
'/.'
);
if( REDIRECT_TO_GITHUB ) {
links[ i ].setAttribute(
'href',
links[ i ].href.replace(
'/.',
process.env.package.repository.url.replace(
'.git',
'/'
),
),
);
}
}
},
Expand Down

0 comments on commit 1cc9cf9

Please sign in to comment.