diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
index 780579774851..d273cc31700c 100644
--- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
+++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx
@@ -20,11 +20,20 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
function BreadcrumbsItemLink({
children,
href,
+ isLast,
}: {
children: ReactNode;
- href?: string;
+ href: string | undefined;
+ isLast: boolean;
}): JSX.Element {
const className = 'breadcrumbs__link';
+ if (isLast) {
+ return (
+
+ {children}
+
+ );
+ }
return href ? (
{children}
@@ -93,17 +102,16 @@ export default function DocBreadcrumbs(): JSX.Element | null {
itemScope
itemType="https://schema.org/BreadcrumbList">
{homePageRoute && }
- {breadcrumbs.map((item, idx) => (
-
-
- {item.label}
-
-
- ))}
+ {breadcrumbs.map((item, idx) => {
+ const isLast = idx === breadcrumbs.length - 1;
+ return (
+
+
+ {item.label}
+
+
+ );
+ })}
);