From 1f7b017c637ba4186b0943d1957286973b0db8b7 Mon Sep 17 00:00:00 2001 From: Quinten Steenhuis Date: Tue, 28 Oct 2025 17:08:18 -0400 Subject: [PATCH 1/2] Redirect old e-filing paths to new one --- docusaurus.config.js | 67 ++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 49 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index e5e5bf894..bbfc251f6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -9,52 +9,7 @@ module.exports = { organizationName: 'SuffolkLITLab', // the GitHub org name. projectName: 'docassemble-AssemblyLine-documentation', // the repo name. themeConfig: { - // Keep for the next LIT Con - // announcementBar: { - // id: 'lit_con', - // content: - // 'Save the date for Suffolk\'s annual šŸ”„LIT ConferencešŸ”„ on April 7th, 2025! Learn more', - // backgroundColor: '#fafbfc', - // textColor: '#091E42', - // isCloseable: false, - // }, - navbar: { - title: 'Document Assembly Line', - logo: { - alt: 'The Suffolk LIT Lab Logo', - src: 'img/lit-lab-logo-small-inverted.svg', - srcDark: 'img/lit-lab-logo-small-inverted.svg' - }, - items: [ - { - type: 'docSidebar', - sidebarId: 'get_started', - label: 'Get started', - }, - { - type: 'docSidebar', - sidebarId: 'docs', - label: 'Documentation', - }, - { - href: 'https://docassemble.org/docs.html', - label: 'Docassemble docs', - position: 'right', - }, - { - href: 'https://www.givecampus.com/campaigns/70271/donations/new', - label: 'Donate', - position: 'right', - className: 'navbar-donate-button', - }, - { - href: 'https://github.com/SuffolkLITLab/docassemble-AssemblyLine', - className: 'header-github-link', - 'aria-label': 'GitHub repository', - position: 'right', - }, - ], - }, + // ...existing code... footer: { style: 'light', links: [ @@ -129,12 +84,26 @@ module.exports = { { from: '/docs/get_started/working_with_teams', to: '/docs/archive/working_with_teams' + }, + { + from: '/docs/efiling/overview/', + to: '/docs/components/EFSPIntegration/overview' } ], - - + createRedirects(existingPath) { + // Redirect any path under /docs/efiling to /docs/components/EFSPIntegration + if (existingPath.startsWith('/docs/components/EFSPIntegration')) { + // Remove the prefix to get the subpath + const subPath = existingPath.substring('/docs/components/EFSPIntegration'.length); + // Only redirect if the subPath is not empty (i.e., not just the base path) + if (subPath === '' || subPath.startsWith('/')) { + // Redirect from /docs/efiling and all subpaths + return ['/docs/efiling' + subPath]; + } + } + return undefined; + }, }, - ], ], themes: [ From a1b48f47127a7b884c3ef1d0c8c5d9fd36d5612e Mon Sep 17 00:00:00 2001 From: Quinten Steenhuis Date: Tue, 28 Oct 2025 17:18:23 -0400 Subject: [PATCH 2/2] Fix redirect edit --- docusaurus.config.js | 61 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 9 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index bbfc251f6..a7b047893 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -9,7 +9,52 @@ module.exports = { organizationName: 'SuffolkLITLab', // the GitHub org name. projectName: 'docassemble-AssemblyLine-documentation', // the repo name. themeConfig: { - // ...existing code... + // Keep for the next LIT Con + // announcementBar: { + // id: 'lit_con', + // content: + // 'Save the date for Suffolk\'s annual šŸ”„LIT ConferencešŸ”„ on April 7th, 2025! Learn more', + // backgroundColor: '#fafbfc', + // textColor: '#091E42', + // isCloseable: false, + // }, + navbar: { + title: 'Document Assembly Line', + logo: { + alt: 'The Suffolk LIT Lab Logo', + src: 'img/lit-lab-logo-small-inverted.svg', + srcDark: 'img/lit-lab-logo-small-inverted.svg' + }, + items: [ + { + type: 'docSidebar', + sidebarId: 'get_started', + label: 'Get started', + }, + { + type: 'docSidebar', + sidebarId: 'docs', + label: 'Documentation', + }, + { + href: 'https://docassemble.org/docs.html', + label: 'Docassemble docs', + position: 'right', + }, + { + href: 'https://www.givecampus.com/campaigns/70271/donations/new', + label: 'Donate', + position: 'right', + className: 'navbar-donate-button', + }, + { + href: 'https://github.com/SuffolkLITLab/docassemble-AssemblyLine', + className: 'header-github-link', + 'aria-label': 'GitHub repository', + position: 'right', + }, + ], + }, footer: { style: 'light', links: [ @@ -84,26 +129,24 @@ module.exports = { { from: '/docs/get_started/working_with_teams', to: '/docs/archive/working_with_teams' - }, - { - from: '/docs/efiling/overview/', - to: '/docs/components/EFSPIntegration/overview' } ], createRedirects(existingPath) { - // Redirect any path under /docs/efiling to /docs/components/EFSPIntegration + // For every canonical page under /docs/components/EFSPIntegration, + // create a redirect-from path under /docs/efiling so old URLs + // like /docs/efiling/... redirect to the new canonical pages. if (existingPath.startsWith('/docs/components/EFSPIntegration')) { - // Remove the prefix to get the subpath const subPath = existingPath.substring('/docs/components/EFSPIntegration'.length); - // Only redirect if the subPath is not empty (i.e., not just the base path) + // include both base and subpaths if (subPath === '' || subPath.startsWith('/')) { - // Redirect from /docs/efiling and all subpaths return ['/docs/efiling' + subPath]; } } return undefined; }, + }, + ], ], themes: [