|
| 1 | +/** |
| 2 | + * Consolidated redirect table for the docs migration (Phase 2). |
| 3 | + * |
| 4 | + * All paths are relative to the site root (no /docs/ prefix) which matches |
| 5 | + * the production Docusaurus setup: routeBasePath "/" and baseUrl "/". |
| 6 | + * |
| 7 | + * Usage in docusaurus.config.ts: |
| 8 | + * |
| 9 | + * import { redirects } from './redirects'; |
| 10 | + * // ... |
| 11 | + * plugins: [ |
| 12 | + * ['@docusaurus/plugin-client-redirects', { redirects }], |
| 13 | + * ], |
| 14 | + * |
| 15 | + * Once live, delete docs/redirects-pending/ and this comment block. |
| 16 | + */ |
| 17 | + |
| 18 | +type Redirect = { from: string | string[]; to: string }; |
| 19 | + |
| 20 | +export const redirects_migration: Redirect[] = [ |
| 21 | + // ── Schema & Data ───────────────────────────────────────────────────────── |
| 22 | + { from: '/topics/schema', to: '/schema/overview' }, |
| 23 | + { from: '/topics/schema-extensions', to: '/schema/extensions' }, |
| 24 | + { from: '/topics/schema-display', to: '/schema/field-visibility' }, |
| 25 | + { from: '/topics/order-weight', to: '/schema/order-weight' }, |
| 26 | + { from: '/topics/labels', to: '/schema/display_label' }, |
| 27 | + { from: '/topics/file-object', to: '/schema/file-object' }, |
| 28 | + { from: '/topics/schema-attr-kind-number-pool', to: '/schema/number-pool' }, |
| 29 | + { from: '/guides/create-schema', to: '/academy/tutorials/build-your-first-schema' }, |
| 30 | + { from: '/guides/import-schema', to: '/schema/create-and-load' }, |
| 31 | + |
| 32 | + // ── Objects & Object Templates ──────────────────────────────────────────── |
| 33 | + { from: '/topics/object-template', to: '/object-templates/overview' }, |
| 34 | + { from: '/guides/object-template', to: '/object-templates/use' }, |
| 35 | + { from: '/topics/object-conversion', to: '/objects/convert-object-kind' }, |
| 36 | + { from: '/topics/metadata', to: '/objects/metadata' }, |
| 37 | + { from: '/guides/object-load', to: '/objects/load-from-yaml' }, |
| 38 | + |
| 39 | + // ── Profiles ────────────────────────────────────────────────────────────── |
| 40 | + { from: '/topics/profiles', to: '/profiles/overview' }, |
| 41 | + { from: '/guides/profiles', to: '/profiles/overview' }, |
| 42 | + |
| 43 | + // ── Computed Attributes ─────────────────────────────────────────────────── |
| 44 | + { from: '/topics/computed-attributes', to: '/computed-attributes/overview' }, |
| 45 | + { from: '/guides/computed-attributes', to: '/computed-attributes/overview' }, |
| 46 | + |
| 47 | + // ── Menu Customization ──────────────────────────────────────────────────── |
| 48 | + { from: '/guides/menu', to: '/menu/overview' }, |
| 49 | + |
| 50 | + // ── Artifact & File Storage ─────────────────────────────────────────────── |
| 51 | + { from: '/topics/object-storage', to: '/artifact-file-storage/overview' }, |
| 52 | + { from: '/guides/object-storage', to: '/artifact-file-storage/configure' }, |
| 53 | + |
| 54 | + // ── Artifacts ───────────────────────────────────────────────────────────── |
| 55 | + { from: '/topics/artifact', to: '/artifacts/overview' }, |
| 56 | + { from: '/guides/artifact', to: '/artifacts/use' }, |
| 57 | + { from: '/guides/artifact-content-composition', to: '/artifacts/content-composition' }, |
| 58 | + |
| 59 | + // ── Transformations ─────────────────────────────────────────────────────── |
| 60 | + { from: '/topics/transformation', to: '/transformations/overview' }, |
| 61 | + { from: '/guides/jinja2-transform', to: '/academy/tutorials/transformations/build-a-jinja2-transformation' }, |
| 62 | + { from: '/guides/python-transform', to: '/academy/tutorials/transformations/build-a-python-transformation' }, |
| 63 | + |
| 64 | + // ── Generators ──────────────────────────────────────────────────────────── |
| 65 | + { from: '/topics/generator', to: '/generators/overview' }, |
| 66 | + { from: '/guides/generator', to: '/academy/tutorials/generators/build-your-first-generator' }, |
| 67 | + { from: '/guides/chaining-generators', to: '/academy/tutorials/generators/build-chained-generators' }, |
| 68 | + { from: '/topics/modular-generators', to: '/generators/modular' }, |
| 69 | + { from: '/guides/modular-generator-best-practices', to: '/generators/modular-best-practices' }, |
| 70 | + |
| 71 | + // ── Webhooks ────────────────────────────────────────────────────────────── |
| 72 | + { from: '/topics/webhooks', to: '/webhooks/overview' }, |
| 73 | + { from: '/guides/webhooks', to: '/webhooks/create' }, |
| 74 | + |
| 75 | + // ── Events ──────────────────────────────────────────────────────────────── |
| 76 | + { from: '/topics/events', to: '/events/event-system' }, |
| 77 | + { from: '/topics/event-actions', to: '/events/overview' }, |
| 78 | + { from: '/guides/events-rules-actions', to: '/events/overview' }, |
| 79 | + |
| 80 | + // ── Resource Manager ───────────────────────────────────────────────────── |
| 81 | + { from: '/topics/resource-manager', to: '/resource-manager/overview' }, |
| 82 | + { from: '/guides/resource-manager', to: '/resource-manager/overview' }, |
| 83 | + |
| 84 | + // ── IPAM ────────────────────────────────────────────────────────────────── |
| 85 | + { from: '/topics/ipam', to: '/ipam/overview' }, |
| 86 | + |
| 87 | + // ── Branches & Change Control ───────────────────────────────────────────── |
| 88 | + // Branches |
| 89 | + { from: '/branching', to: '/branches/overview' }, |
| 90 | + { from: '/topics/branching', to: '/branches/overview' }, |
| 91 | + // Proposed Changes |
| 92 | + { from: '/proposed-change', to: '/proposed-changes/overview' }, |
| 93 | + { from: '/topics/proposed-change', to: '/proposed-changes/overview' }, |
| 94 | + // Checks |
| 95 | + { from: '/topics/check', to: '/checks/overview' }, |
| 96 | + { from: '/guides/check', to: '/academy/tutorials/build-a-check' }, |
| 97 | + // Git Integration |
| 98 | + { from: '/topics/repository', to: '/git-integration/overview' }, |
| 99 | + { from: '/guides/repository', to: '/git-integration/connect-repository' }, |
| 100 | + { from: '/topics/infrahub-yml', to: '/git-integration/infrahub-yml' }, |
| 101 | + { from: '/topics/branch-synchronization', to: '/git-integration/branch-synchronization' }, |
| 102 | + { from: '/guides/selective-branch-sync', to: '/git-integration/branch-synchronization' }, |
| 103 | + // Change Approval |
| 104 | + { from: '/guides/change-approval-workflow', to: '/change-approval/change-approval-workflow' }, |
| 105 | + |
| 106 | + // ── Testing Framework ───────────────────────────────────────────────────── |
| 107 | + { from: '/topics/resources-testing-framework', to: '/testing-framework/overview' }, |
| 108 | + |
| 109 | + // ── Development Resources ───────────────────────────────────────────────── |
| 110 | + { from: '/topics/developer-guide', to: '/development-resources/developer-guide' }, |
| 111 | + { from: '/topics/graphql', to: '/development-resources/graphql/overview' }, |
| 112 | + { from: '/guides/graphql-fragment', to: '/development-resources/graphql-fragments' }, |
| 113 | + |
| 114 | + // ── Deploy & Manage — Install & Configure ──────────────────────────────── |
| 115 | + { from: '/topics/hardware-requirements', to: '/deploy-manage/install-configure/hardware-requirements' }, |
| 116 | + { from: '/guides/installation', to: '/deploy-manage/install-configure/install/overview' }, |
| 117 | + { from: '/guides/production-deployment', to: '/deploy-manage/install-configure/production-deployment/overview' }, |
| 118 | + { from: '/guides/configuration-changes', to: '/deploy-manage/install-configure/configure-infrahub' }, |
| 119 | + |
| 120 | + // ── Deploy & Manage — Run & Observe ────────────────────────────────────── |
| 121 | + { from: '/topics/tasks', to: '/deploy-manage/run-observe/tasks' }, |
| 122 | + { from: '/guides/telemetry', to: '/deploy-manage/run-observe/telemetry' }, |
| 123 | + { from: '/topics/activity-log', to: '/deploy-manage/run-observe/activity-log' }, |
| 124 | + { from: '/topics/log-forwarding', to: '/deploy-manage/run-observe/log-forwarding/overview' }, |
| 125 | + { from: '/guides/log-forwarding', to: '/deploy-manage/run-observe/log-forwarding/configure-log-forwarding' }, |
| 126 | + |
| 127 | + // ── Deploy & Manage — Maintain & Upgrade ──────────────────────────────── |
| 128 | + { from: '/guides/upgrade', to: '/deploy-manage/maintain-upgrade/upgrade/overview' }, |
| 129 | + { from: '/topics/database-backup', to: '/deploy-manage/maintain-upgrade/database-backup/overview' }, |
| 130 | + { from: '/guides/database-backup', to: '/deploy-manage/maintain-upgrade/database-backup/backup-and-restore' }, |
| 131 | + |
| 132 | + // ── Deploy & Manage — User Management & Security ───────────────────────── |
| 133 | + { from: '/topics/authentication', to: '/deploy-manage/user-management/authentication' }, |
| 134 | + { from: '/guides/sso', to: '/deploy-manage/user-management/sso/overview' }, |
| 135 | + { from: '/topics/permissions-roles', to: '/deploy-manage/user-management/permissions-roles/overview' }, |
| 136 | + { from: '/guides/accounts-permissions', to: '/deploy-manage/user-management/permissions-roles/manage-accounts-and-permissions' }, |
| 137 | + { from: '/guides/managing-api-tokens', to: '/deploy-manage/user-management/managing-api-tokens' }, |
| 138 | + |
| 139 | + // ── Missing guide pages ─────────────────────────────────────────────────── |
| 140 | + { from: '/guides/customize-field-ordering', to: '/schema/order-weight' }, |
| 141 | + { from: '/guides/groups', to: '/groups/overview' }, |
| 142 | + { from: '/guides/object-conversion', to: '/objects/convert-object-kind' }, |
| 143 | + |
| 144 | + // ── Missing topic pages ─────────────────────────────────────────────────── |
| 145 | + { from: '/topics/architecture', to: '/overview/architecture' }, |
| 146 | + { from: '/topics/bus-event-handling', to: '/reference/message-bus-events' }, |
| 147 | + { from: '/topics/community-vs-enterprise', to: '/overview/community-vs-enterprise' }, |
| 148 | + { from: '/topics/groups', to: '/groups/overview' }, |
| 149 | + { from: '/topics/local-demo-environment', to: '/development-resources/local-demo-environment' }, |
| 150 | + { from: '/topics/version-control', to: '/immutable-history/overview' }, |
| 151 | + |
| 152 | + // ── Legacy top-level section indexes ───────────────────────────────────── |
| 153 | + // /guides and /topics were Docusaurus generated-index pages for the old sidebar |
| 154 | + // sections. Both sections have been replaced by the new domain-based structure. |
| 155 | + { from: ['/guides', '/topics'], to: '/' }, |
| 156 | + |
| 157 | + // ── Legacy category index pages ─────────────────────────────────────────── |
| 158 | + // These /category/* URLs were auto-generated by Docusaurus from the old sidebar |
| 159 | + // category labels. Slugs: spaces→hyphens, "&"→double-hyphens, duplicates→-1 suffix. |
| 160 | + |
| 161 | + // Old "Guides" sub-categories |
| 162 | + { from: '/category/installation--setup', to: '/deploy-manage/install-configure/install/overview' }, |
| 163 | + { from: '/category/schema--data-modeling', to: '/schema-and-data' }, |
| 164 | + { from: '/category/data-management', to: '/schema-and-data' }, |
| 165 | + { from: '/category/artifact--transform', to: '/automation-and-outputs' }, |
| 166 | + { from: '/category/generators', to: '/generators/overview' }, |
| 167 | + { from: '/category/integration--events', to: '/events/overview' }, |
| 168 | + { from: '/category/user-management--authentication', to: '/deploy-manage/user-management/authentication' }, |
| 169 | + |
| 170 | + // Old "Topics > Overview" sub-category |
| 171 | + { from: '/category/overview', to: '/overview' }, |
| 172 | + |
| 173 | + // Old "Topics > Core Concepts" and its sub-categories |
| 174 | + { from: '/category/core-concepts', to: '/schema-and-data' }, |
| 175 | + { from: '/category/git-integration', to: '/git-integration/overview' }, |
| 176 | + { from: '/category/transforms--artifacts', to: '/automation-and-outputs' }, |
| 177 | + { from: '/category/generators-1', to: '/generators/overview' }, |
| 178 | + { from: '/category/version-control--branching', to: '/branches-and-change-control' }, |
| 179 | + { from: '/category/file-storage', to: '/artifact-file-storage/overview' }, |
| 180 | + { from: '/category/schema', to: '/schema/overview' }, |
| 181 | + { from: '/category/data-management-1', to: '/schema-and-data' }, |
| 182 | + { from: '/category/ipam', to: '/ipam/overview' }, |
| 183 | + |
| 184 | + // Old "Topics > Platform Capabilities" and its sub-categories |
| 185 | + { from: '/category/platform-capabilities', to: '/deployment-and-management' }, |
| 186 | + { from: '/category/user-management--authentication-1', to: '/deploy-manage/user-management/authentication' }, |
| 187 | + { from: '/category/event-management--logging', to: '/events/overview' }, |
| 188 | + { from: '/category/system-administration', to: '/deployment-and-management' }, |
| 189 | + |
| 190 | + // Old "Topics > Development Resources" |
| 191 | + { from: '/category/development-resources', to: '/development-resources' }, |
| 192 | + |
| 193 | + // ── Deploy & Manage sub-hub index → overview backward-compat ─────────────── |
| 194 | + // Old /X/ URLs for deploy-manage sub-folders and graphql (from index.mdx) now redirect to /X/overview. |
| 195 | + { from: '/deploy-manage/install-configure/install', to: '/deploy-manage/install-configure/install/overview' }, |
| 196 | + { from: '/deploy-manage/install-configure/production-deployment', to: '/deploy-manage/install-configure/production-deployment/overview' }, |
| 197 | + { from: '/deploy-manage/run-observe/log-forwarding', to: '/deploy-manage/run-observe/log-forwarding/overview' }, |
| 198 | + { from: '/deploy-manage/maintain-upgrade/database-backup', to: '/deploy-manage/maintain-upgrade/database-backup/overview' }, |
| 199 | + { from: '/deploy-manage/maintain-upgrade/upgrade', to: '/deploy-manage/maintain-upgrade/upgrade/overview' }, |
| 200 | + { from: '/deploy-manage/user-management/sso', to: '/deploy-manage/user-management/sso/overview' }, |
| 201 | + { from: '/deploy-manage/user-management/permissions-roles', to: '/deploy-manage/user-management/permissions-roles/overview' }, |
| 202 | + { from: '/development-resources/graphql', to: '/development-resources/graphql/overview' }, |
| 203 | + |
| 204 | + // ── Feature hub index → overview backward-compat ───────────────────────── |
| 205 | + // Old canonical /X/ URLs (from index.mdx) now redirect to /X/overview. |
| 206 | + { from: '/schema', to: '/schema/overview' }, |
| 207 | + { from: '/artifact-file-storage', to: '/artifact-file-storage/overview' }, |
| 208 | + { from: '/artifacts', to: '/artifacts/overview' }, |
| 209 | + { from: '/branches', to: '/branches/overview' }, |
| 210 | + { from: '/checks', to: '/checks/overview' }, |
| 211 | + { from: '/computed-attributes', to: '/computed-attributes/overview' }, |
| 212 | + { from: '/events', to: '/events/overview' }, |
| 213 | + { from: '/generators', to: '/generators/overview' }, |
| 214 | + { from: '/git-integration', to: '/git-integration/overview' }, |
| 215 | + { from: '/groups', to: '/groups/overview' }, |
| 216 | + { from: '/immutable-history', to: '/immutable-history/overview' }, |
| 217 | + { from: '/ipam', to: '/ipam/overview' }, |
| 218 | + { from: '/menu', to: '/menu/overview' }, |
| 219 | + { from: '/object-templates', to: '/object-templates/overview' }, |
| 220 | + { from: '/objects', to: '/objects/overview' }, |
| 221 | + { from: '/profiles', to: '/profiles/overview' }, |
| 222 | + { from: '/proposed-changes', to: '/proposed-changes/overview' }, |
| 223 | + { from: '/resource-manager', to: '/resource-manager/overview' }, |
| 224 | + { from: '/testing-framework', to: '/testing-framework/overview' }, |
| 225 | + { from: '/transformations', to: '/transformations/overview' }, |
| 226 | + { from: '/webhooks', to: '/webhooks/overview' }, |
| 227 | +]; |
0 commit comments