Skip to content

Commit

Permalink
bug fix: fix index.mdx nav items not resolving for api-docs & docs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
heatlikeheatwave authored Aug 16, 2024
1 parent c12d24b commit 9b16c7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions build-libs/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ async function buildDevPortalRedirects() {
destination: '/certifications/security-automation',
permanent: true,
},
{
source: '/:path*/index',
destination: '/:path*',
permanent: true,
},
/**
* Redirects from our former Packer Plugin library to our
* new integrations library for Packer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function prepareNavNodeForClient({
* we could add a warning or error here, or resolve this
* through content conformance efforts.
*/
const pathWithIndexFix = node.path == 'index' ? '' : node.path
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
const preparedItem = {
...node,
path: pathWithIndexFix,
Expand Down

0 comments on commit 9b16c7b

Please sign in to comment.