fix: generated index URLs were URI encoded (#32226)

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
Aramis Sennyey
2026-01-05 09:17:18 -07:00
committed by GitHub
parent 8e9c30d04a
commit ae31b31664
+3 -3
View File
@@ -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,
};