feat(webapp): add JSON-LD to tag and source detail pages#5684
feat(webapp): add JSON-LD to tag and source detail pages#5684
Conversation
Render schema.org JSON-LD in tag and source detail pages using CollectionPage, BreadcrumbList, and supporting entities so crawlers can better interpret these surfaces. Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude please review this pr |
|
Claude finished @nimrodkra's task in 1m 54s —— View job PR Review
Overall this is a clean, well-structured addition that follows the existing squad-page JSON-LD pattern closely. A few things worth addressing: Issues1.
...(source.image && { logo: source.image }),Google's structured data guidelines require ...(source.image && {
logo: { '@type': 'ImageObject', url: source.image },
}),Note: the squad page ( 2.
{
'@type': 'ItemList',
'@id': `${tagUrl}#items`,
numberOfItems: topPosts.length, // could be 0
itemListElement: topPosts.map(…), // could be []
}An ...(topPosts.length > 0 && {
'@type': 'ItemList',
'@id': `${tagUrl}#items`,
numberOfItems: topPosts.length,
itemListElement: topPosts.map(…),
}),Or simply spread it conditionally into the 3.
{
'@type': 'CollectionPage',
'@id': `${sourcePageUrl}#page`,
url: sourcePageUrl,
name: `${source.name} posts on daily.dev`,
...(source.description && { description: source.description }),
about: { '@id': `${sourcePageUrl}#organization` },
isPartOf: { '@type': 'WebSite', url: appOrigin },
},Nits
What looks good
|
Use an ImageObject for source organization logos, include source page descriptions on CollectionPage, and emit tag ItemList schema only when top posts are available. Made-with: Cursor
Summary
CollectionPage,ItemList, andBreadcrumbListOrganization,CollectionPage, andBreadcrumbList<head>using existing squad-page patternWhy this matters
Structured data helps Google understand page intent and entity relationships, which can improve eligibility for rich-result presentation. Adding this to tag/source detail pages closes a major discoverability gap versus our already-optimized index and squad surfaces.
Test plan
pnpm --filter webapp lintpnpm --filter webapp build(fails locally due DNS lookup forapi.local.fylla.devduring prerender in this environment)Made with Cursor
Preview domain
https://seo-pr2-json-ld.preview.app.daily.dev