-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add JSON-LD support for all pages #93
Conversation
this is looking good @GuilleAngulo - a few comments there its interesting, google's updated rich testing tool (https://search.google.com/test/rich-results) doesnt show anything for categories like https://deploy-preview-93--next-wordpress-starter.netlify.app/categories/lorem/ but it clearly works when testing on the old tool at https://search.google.com/structured-data/testing-tool i wonder if it specifically only tests and shows rich actions, not general structured data anyways lookin good |
I was checking this last issue you are mentioning, and I think I figured out why: So aparently Google indicates at their guide which structures/features they will considerate in order to show rich results. From the 4 structures, only Article ( Also checking this one I found that logo could qualify as rich result. Shall I include a logo structure at index page? Would be an interesting default feature? |
ah thats interesting maybe the logo can be an opt-in feature? 🤔 only thinking is right now there's no logo on the site, but maybe i can come up with a simple logo later just for the purposes of having a placeholder image for people to swap in their own, then we can include it in this |
Yeah, I will leave the structure of LogoJsonLd() prepared inside the file. So you can use whenever is ready 👍 Just another note: Now the logo is taken like this: |
i think that works for now until we get it set up. thanks @GuilleAngulo |
I sent the dates wrong again ... I think I had a mental block with that part 😅. Thanks for fixing! |
haha np, didn't wanna bug ya again for the quick tweak |
Description
It creates JSON-LD support by adding the json-ld script to the React Helmet. There are 4 main structures:
1.- ArticleJsonLd - For blog posts
2.- WebsiteJsonLd - For index (with integrated searchbox)
3.- AuthorJsonLd - For authors page
4.- WebpageJsonLd - This is the most generic one. Is used in all the rest of pages.
I've checked results with different values at https://search.google.com/structured-data/testing-tool, and I believe is working fine.
For Article the image appears to be a recommended/important field and not every time a post has a featuredImage, so when #13 is solved would be great to include it as the default image for the post in case there is no featureImage.
Fixes #92