diff --git a/packages/docusaurus-module-type-aliases/src/index.d.ts b/packages/docusaurus-module-type-aliases/src/index.d.ts index 7292518fc3b9..0ca795ee13b4 100644 --- a/packages/docusaurus-module-type-aliases/src/index.d.ts +++ b/packages/docusaurus-module-type-aliases/src/index.d.ts @@ -37,7 +37,7 @@ declare module '@generated/registry' { declare module '@generated/routes' { import type {RouteConfig} from 'react-router-config'; - type Route = { + export type Route = { readonly path: string; readonly component: RouteConfig['component']; readonly exact?: boolean; diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx index 8eecbe54170a..f912aac438a4 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx @@ -6,7 +6,11 @@ */ import React, {type ReactNode} from 'react'; -import {ThemeClassNames, useSidebarBreadcrumbs} from '@docusaurus/theme-common'; +import { + ThemeClassNames, + useSidebarBreadcrumbs, + useHomePageRoute, +} from '@docusaurus/theme-common'; import styles from './styles.module.css'; import clsx from 'clsx'; import Link from '@docusaurus/Link'; @@ -59,6 +63,7 @@ function HomeBreadcrumbItem() { export default function DocBreadcrumbs(): JSX.Element | null { const breadcrumbs = useSidebarBreadcrumbs(); + const homePageRoute = useHomePageRoute(); if (!breadcrumbs) { return null; @@ -72,7 +77,7 @@ export default function DocBreadcrumbs(): JSX.Element | null { )} aria-label="breadcrumbs">