diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx index f9230c1b8cae..a3bb2f05d355 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx @@ -59,6 +59,9 @@ function useCategoryHrefWithSSRFallback( ): string | undefined { const isBrowser = useIsBrowser(); return useMemo(() => { + if (item.href && !item.linkUnlisted) { + return item.href; + } // In these cases, it's not necessary to render a fallback // We skip the "findFirstCategoryLink" computation if (isBrowser || !item.collapsible) {