Skip to content

Commit f6f19fc

Browse files
authored
fix: redirects (#2097)
1 parent 2b8e48a commit f6f19fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docusaurus.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,10 @@ const config: Config = {
216216
}
217217
],
218218
createRedirects(existingPath) {
219-
if (existingPath.startsWith('/guides/community/rfcs/')) {
220-
return existingPath.replace('/guides/community/rfcs/', '/developer/community/rfcs/');
219+
const regex = /^\/guides\/community\/rfcs\/(.+)/;
220+
const match = existingPath.match(regex);
221+
if (match) {
222+
return `/developer/community/rfcs/${match[1]}`;
221223
}
222224
return undefined;
223225
}

0 commit comments

Comments
 (0)