fix: generated index URLs were URI encoded (#32226)
Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
@@ -27,17 +27,17 @@ function sidebarElementWithIndex(
|
||||
},
|
||||
children: Array<string | object>,
|
||||
) {
|
||||
const { label, description, differentiator } = element;
|
||||
const { label, description, differentiator = '' } = element;
|
||||
return {
|
||||
type: 'category',
|
||||
label: label,
|
||||
label,
|
||||
description,
|
||||
link: {
|
||||
type: 'generated-index',
|
||||
title: label,
|
||||
slug: `/${differentiator}${label
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9 _-]/gi, '-')}/generated-index`,
|
||||
.replace(/[^a-z0-9]/g, '-')}/generated-index`,
|
||||
},
|
||||
items: children,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user