Skip to content

Commit 2d5a1f5

Browse files
Jake Mahonclaude
authored andcommitted
Fix KB index link trailing slash issues
- Remove trailing slashes from KB index link generation - Fixes broken links like /docs/kb/accessinformationcenter/ -> /docs/kb/accessinformationcenter - Resolves 404 errors caused by Docusaurus serving without trailing slash by default 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent b315185 commit 2d5a1f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/generateKBSidebar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function generateKBSidebar(productName) {
105105

106106
// Handle index.md files specially - they should link to parent directory
107107
const href = file === 'index.md'
108-
? `/docs/kb/${productName}/${folder.name}/`
108+
? `/docs/kb/${productName}/${folder.name}`
109109
: `/docs/kb/${productName}/${folder.name}/${encodeURIComponent(file.replace('.md', ''))}`;
110110

111111
return {
@@ -140,7 +140,7 @@ function generateKBSidebar(productName) {
140140

141141
// Handle index.md files specially - they should link to parent directory
142142
const href = file.name === 'index.md'
143-
? `/docs/kb/${productName}/`
143+
? `/docs/kb/${productName}`
144144
: `/docs/kb/${productName}/${encodeURIComponent(file.name.replace('.md', ''))}`;
145145

146146
return {

0 commit comments

Comments
 (0)