-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Description
Description
When a type: "link" inside a sidebar category points to the same URL as a generated-index page in another category, Docusaurus renders the page with items from the link's parent category instead of the generated-index's actual items.
Example
// sidebars.js
{
type: "category",
label: "Category A",
items: [
{ type: "doc", id: "doc1" },
{ type: "doc", id: "doc2" },
{
type: "link",
label: "Go to Category B →",
href: "https://github.com/docs/category-b", // URL of the generated-index page
},
],
},
{
type: "category",
label: "Category B",
link: {
type: "generated-index",
slug: "https://github.com/category-b",
},
items: ["item1", "item2", "item3"],
},/docs/category-b shows cards for item1, item2, item3
But shows cards for doc1, doc2 (items from Category A)
Breadcrumb shows: Category A > Go to Category B
Note
There is no warning in the official documentation about this behavior. The docs for generated-index and type: "link" don't mention this limitation.
Metadata
Metadata
Assignees
Labels
No labels