-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I'm using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand re-installing packages. - I have tried creating a repro with https://new.docusaurus.io.
- I have read the console error message carefully (if applicable).
Description
node_modules/@docusaurus/theme-classic/lib/theme/DocBreadcrumbs/index.js
Why is an href required here to add a ListItem? It seems like there might be some issues with this approach. (For objects of type "BreadcrumbList," schemas such as schema.org don't recognize "position" as a valid property.)
reference file: https://developers.google.com/search/docs/appearance/structured-data/breadcrumb#structured-data-type-definitions

Reproducible demo
No response
Steps to reproduce
, In the SidebarsConfig, whenever an element's type is "Category" and it doesn't need to include the href attribute, you may encounter this issue of structured data inconsistency.

Expected behavior
I believe there's no need to determine whether it's part of the breadcrumb navigation based on the presence of href here, as this is already within the breadcrumb navigation itself.
Actual behavior
`node_modules/@docusaurus/theme-classic/lib/theme/DocBreadcrumbs/index.js `
The href is an optional attribute, but it is used to determine whether it is a part of the breadcrumb.
Your environment
- Public source code:
- Public site URL:
- Docusaurus version used:
- Environment name and version (e.g. Chrome 89, Node.js 16.4):
- Operating system and version (e.g. Ubuntu 20.04.2 LTS):
Self-service
- I'd be willing to fix this bug myself.
