Skip to content

Commit 4b9156b

Browse files
committed
fix: ssr and localizations
1 parent a55c84c commit 4b9156b

File tree

8 files changed

+2
-1
lines changed

8 files changed

+2
-1
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/src/modules/utils/find.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function findPages(
101101
if (
102102
options.front &&
103103
pathname.indexOf('/components') === -1 &&
104-
pathname.indexOf('/api') === -1
104+
pathname.indexOf('/api-docs') === -1
105105
) {
106106
return;
107107
}

docs/src/server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ async function run() {
4242
// We remove it to normalize the pathname.
4343
// See `_rewriteUrlForNextExport` on Next.js side.
4444
pathname = pathname.replace(/\/$/, '');
45+
pathname = pathname.replace(/^\/api\/(.*)/, '/api-docs/$1');
4546
}
4647

4748
nextApp.render(req, res, pathname, {

0 commit comments

Comments
 (0)