Skip to content

Commit

Permalink
fix: ssr and localizations
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Mar 2, 2020
1 parent a55c84c commit 4b9156b
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/src/modules/utils/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function findPages(
if (
options.front &&
pathname.indexOf('/components') === -1 &&
pathname.indexOf('/api') === -1
pathname.indexOf('/api-docs') === -1
) {
return;
}
Expand Down
1 change: 1 addition & 0 deletions docs/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async function run() {
// We remove it to normalize the pathname.
// See `_rewriteUrlForNextExport` on Next.js side.
pathname = pathname.replace(/\/$/, '');
pathname = pathname.replace(/^\/api\/(.*)/, '/api-docs/$1');
}

nextApp.render(req, res, pathname, {
Expand Down

0 comments on commit 4b9156b

Please sign in to comment.