Skip to content

Commit 7b7fab1

Browse files
Merge pull request #574 from SuffolkLITLab/add-redirect
Add EFSP redirect
2 parents d996d60 + a1b48f4 commit 7b7fab1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

docusaurus.config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,19 @@ module.exports = {
131131
to: '/docs/archive/working_with_teams'
132132
}
133133
],
134-
134+
createRedirects(existingPath) {
135+
// For every canonical page under /docs/components/EFSPIntegration,
136+
// create a redirect-from path under /docs/efiling so old URLs
137+
// like /docs/efiling/... redirect to the new canonical pages.
138+
if (existingPath.startsWith('/docs/components/EFSPIntegration')) {
139+
const subPath = existingPath.substring('/docs/components/EFSPIntegration'.length);
140+
// include both base and subpaths
141+
if (subPath === '' || subPath.startsWith('/')) {
142+
return ['/docs/efiling' + subPath];
143+
}
144+
}
145+
return undefined;
146+
},
135147

136148
},
137149

0 commit comments

Comments
 (0)