-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The structured data items may contain fields that do not comply with Google's guidelines, which can negatively impact SEO. #9319
Comments
version: v2.3.1 |
Hey 👋 First when opening bugs, please make sure to always use the latest stable version. In this case it doesn't seem to matter, but it could. It seems that change was done for a reason by @Josh-Cena here: #7304 I'm not 100% sure to understand what is your suggestion and why. A real, concrete example always helps. My suggestion:
|
@johnnyreilly any opinion on the suggested change? |
Hello, the following HTML website was selected from your official user cases, and it has the same issue as mine – both failed to pass the validation of schema.org and Google. The validation tool's website - schema.org
|
Thanks @TingJianZheng And now can you please modify manually this HTML to show what exactly should be the desired output? This way we can validate the desired output and see if tools like it better. And then we can try to provide the dDocusaurus implementation to emit that output.
I don't understand your text here, that's also why I ask for a very concrete before/after example. According to what I see in our code, href and position are not related 🤷♂️ By the way Google seems to be ok with your Algolia page example: |
Hi @slorber, I suspect that migrating from microdata to JSON-LD structured data (as I've proposed for blogs here: #9274) would resolve the issue. That's likely a cleaner approach. Fwiw I've swizzled breadcrumb JSON-LD structured data on my blog and it's pretty straightforward - I've written about it here: https://johnnyreilly.com/docusaurus-blogs-adding-breadcrumb-structured-data |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.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
Self-service
The text was updated successfully, but these errors were encountered: