You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The position property in the breadcrumb SEO microdata generated by Docusaurus is invalid according to the Schema.org vocabulary when a breadcrumb item (e.g., a category item in the sidebar) has no associated link. According to the Schema.org documentation, position is only valid within the context of ListItem, not directly under BreadcrumbList.
While this is not a high severity issue, it does cause a large amount of (noisy) "structured data items are invalid" errors within SEO auditing tools like SEMRush.
position: The property position is not recognized by Schema.org vocabulary.
Bug submitted upstream in docusaurus repo.
facebook/docusaurus#10859
Description
The position property in the breadcrumb SEO microdata generated by Docusaurus is invalid according to the Schema.org vocabulary when a breadcrumb item (e.g., a category item in the sidebar) has no associated link. According to the Schema.org documentation, position is only valid within the context of ListItem, not directly under BreadcrumbList.
While this is not a high severity issue, it does cause a large amount of (noisy) "structured data items are invalid" errors within SEO auditing tools like SEMRush.
This might have some relation to #7241.
The solution seems as simple as adding a conditional to the following line to only include when
addMicroData
evaluates to true. However, I do not have much experience under the hood with docusaurus to know if this has repercussions.https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/DocBreadcrumbs/index.tsx#L74
Reproducible demo
https://github.com/travelton/docusaurus-schema-bug
Steps to reproduce
npm start
<meta itemprop="position" content="1">
outside of the ListItem, but within the BreadcumbList.The property position is not recognized by the schema (e.g. schema.org) for an object of type BreadcrumbList.
Expected behavior
The position property should only appear within the ListItem context. For example:
Actual behavior
The position property is being included within the BreadcumbList context, outside of the ListItem context. For example:
The text was updated successfully, but these errors were encountered: