Skip to content

Commit 9b16c7b

Browse files
bug fix: fix index.mdx nav items not resolving for api-docs & docs (#2542)
1 parent c12d24b commit 9b16c7b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

build-libs/redirects.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ async function buildDevPortalRedirects() {
209209
destination: '/certifications/security-automation',
210210
permanent: true,
211211
},
212+
{
213+
source: '/:path*/index',
214+
destination: '/:path*',
215+
permanent: true,
216+
},
212217
/**
213218
* Redirects from our former Packer Plugin library to our
214219
* new integrations library for Packer,

src/layouts/sidebar-sidecar/utils/prepare-nav-data-for-client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async function prepareNavNodeForClient({
162162
* we could add a warning or error here, or resolve this
163163
* through content conformance efforts.
164164
*/
165-
const pathWithIndexFix = node.path == 'index' ? '' : node.path
165+
const pathWithIndexFix = node.path.endsWith('/index') ? '' : node.path // TODO: Remove this stopgap once this task is complete https://app.asana.com/0/1207947026228781/1208077887539354/f
166166
const preparedItem = {
167167
...node,
168168
path: pathWithIndexFix,

0 commit comments

Comments
 (0)