Skip to content

Commit

Permalink
feat(docs): add redirect to 'next' subdirectory (#1446)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Apr 30, 2019
1 parent a11c93d commit b245105
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/assets/ghspa.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@

;(function(l, projectPages) {

var repo = projectPages ? '/' + l.pathname.split('/')[1] : '';
var paths = l.pathname.split('/');
var repo = projectPages ? '/' + paths[1] : '';
if (paths[2] === 'next') {
repo += '/next';
}

/* redirect all 404 trafic to index.html */
function redirect() {
Expand Down

0 comments on commit b245105

Please sign in to comment.