diff --git a/docs/public/components/doc-structure.js b/docs/public/components/doc-structure.js index 1acdc36d7..e44c8b5ff 100644 --- a/docs/public/components/doc-structure.js +++ b/docs/public/components/doc-structure.js @@ -4,7 +4,7 @@ export { content }; const pages = new Map( content.map((item, index) => { if ('heading' in item) return ['', -1]; - item.slug = `/docs/${item.name}`.replace(/\/index$/g, ''); + item.slug = `/docs/${item.name.replace(/^index$/, '')}`; return [item.name, index]; }) );