From b7bd8aabb623180a484acad2bba8d753762355b4 Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Wed, 4 May 2022 15:41:48 +0800 Subject: [PATCH] fix(theme-classic): remove breadcrumb items without href from microdata --- .../src/theme/DocBreadcrumbs/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx index 795a3d0b7187..373c56b9d02d 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx @@ -40,9 +40,12 @@ function BreadcrumbsItemLink({ {children} ) : ( - - {children} - + // TODO Google search console doesn't like breadcrumb items without href. + // The schema doesn't seem to require `id` for each `item`, although Google + // insist to infer one, even if it's invalid. Removing `itemProp="item + // name"` for now, since I don't know how to properly fix it. + // See https://github.com/facebook/docusaurus/issues/7241 + {children} ); }