Add schema.org and JSONLD to pages#16186
Conversation
…dcrumb and creative work details
…metadata and breadcrumb navigation
…g metadata, breadcrumb navigation, and item list details
…etadata, breadcrumb navigation, and community resources details
…uding acknowledgements, contributors, and translatathon leaderboard with metadata and breadcrumb navigation
…adata, breadcrumb navigation, and resource details for tutorials, learning tools, local environment, and main developers page
…metadata, breadcrumb navigation, and publisher information
…ata, breadcrumb navigation, and publisher information
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
pettinarip
left a comment
There was a problem hiding this comment.
@corwintines maybe a late comment on this work but was wondering if we could abstract this code in a separate file to avoid adding too many things in each file and see if we can avoid some duplication
new-page/
├─ page.tsx
├─ page-jsonld.ts // exports an adapted PageJsonLD component to be used in page.tsx
components/
├─ PageJsonLD.tsx // generic component that prints the `script` tagsWe could set a pattern for all pages to look like this.
At the page level
import PageJsonLD from "./page-jsonld"
return (
<PageJsonLD {...frontmatter} />
...rest
)===
related issue to the mindset I had for this implementation.
pettinarip
left a comment
There was a problem hiding this comment.
@corwintines I've found two small issues. The rest looks great 👍🏼
pettinarip
left a comment
There was a problem hiding this comment.
@corwintines nice work. I'll patch the issues commented and bring this in.
Something we could improve later are pages with product listings, where we have invalid items

some of those pages are (not 100% sure if there are more):

Description
Can test schemas on https://search.google.com/test/rich-results
https://technicalseo.com/tools/google-serp-simulator/
More info on structured data: https://developers.google.com/search/docs/appearance/structured-data/search-gallery
More info on Schema.org: https://schema.org/
Info on JSON-LD: https://nextjs.org/docs/app/guides/json-ld