Skip to content
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

Generate JSON-LD for structured data instead of Microdata #855

Open
teddydoors opened this issue Oct 13, 2020 · 1 comment
Open

Generate JSON-LD for structured data instead of Microdata #855

teddydoors opened this issue Oct 13, 2020 · 1 comment

Comments

@teddydoors
Copy link

Google explicitly says they recommend using JSON-LD for structured data.
https://developers.google.com/search/docs/guides/intro-structured-data#markup-formats-and-placement

Initially, I think it doesn't matter much. But later on when trying to customize Q2A layout to build a new theme, I realize that the way Q2A using Microdata structures make it more difficult to implement. You always have to watch out for any missing "itemprop" things, and the structure is hard to customize, especially with the order of Microdata structure elements. Sometimes you have to create a dummy DOM that is not visible to human eyes but to complete the Microdata structures. Moreover, in question lists where the structured data are not required, but "itemprop" things still exist, for example in user avatars.

So, if Google loves JSON-LD, why don't we make them overjoyed?
(FYI, I see Wikipedia.org also outputs JSON-LD.)

@svivian
Copy link
Collaborator

svivian commented Nov 12, 2020

Yes, I understand the markup argument, it was quite a hassle to update the templates to support the microdata in the HTML. But on the other hand, adding the JSON-LD is very wasteful, it repeats the entire content of the page again inside the JS. So the page is twice as slow. I'll see if there is a way around it.

@svivian svivian mentioned this issue Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants