-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add structured data to the homepage #8427
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
Conversation
| "@id": `${SEO.url}#website`, | ||
| url: SEO.url, | ||
| name: SEO.name, | ||
| alternateName: ["RooCode", "Roo Cline"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Possible typo in website alternateName: 'Roo Cline' might be intended as 'Roo Code'.
| alternateName: ["RooCode", "Roo Cline"], | |
| alternateName: ["RooCode", "Roo Code"], |
This comment was generated because it violated a code review rule: irule_VrRKWqywZ2YV2SOE.
|
🚀 Preview deployed! Your changes have been deployed to Vercel: Preview URL: https://roo-code-website-44ao3yv92-roo-code.vercel.app This preview will be updated automatically when you push new commits to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention.
| */ | ||
| export function getStructuredData(): StructuredDataGraph { | ||
| // Organization ID - used to link all entities | ||
| const orgId = `${SEO.url}#org` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Ensure consistent @id with a single slash before the fragment and avoid double slashes if SEO.url ends with '/'.
| const orgId = `${SEO.url}#org` | |
| const orgId = `${SEO.url.replace(/\/$/, '')}/#org` |
|
|
||
| const website: WebSite = { | ||
| "@type": "WebSite", | ||
| "@id": `${SEO.url}#website`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Normalize WebSite @id similar to org.
| "@id": `${SEO.url}#website`, | |
| "@id": `${SEO.url.replace(/\/$/, '')}/#website`, |
|
|
||
| const softwareApplication: SoftwareApplication = { | ||
| "@type": "SoftwareApplication", | ||
| "@id": `${SEO.url}#vscode-extension`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Normalize SoftwareApplication @id similar to org.
| "@id": `${SEO.url}#vscode-extension`, | |
| "@id": `${SEO.url.replace(/\/$/, '')}/#vscode-extension`, |
| * StructuredData Component | ||
| * | ||
| * Renders JSON-LD structured data in the document head for SEO. | ||
| * This component should only be used once per page, typically in the root layout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: The usage note suggests root layout; this PR uses it on the homepage. Adjust wording to reduce confusion.
| * This component should only be used once per page, typically in the root layout. | |
| * Use once per page. For sitewide JSON-LD, include it in the root layout; for page-specific JSON-LD, include it in that page component. |
|
|
||
| return ( | ||
| <> | ||
| <StructuredData /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: Optional: If you want JSON-LD on all routes, consider rendering StructuredData in the root layout instead of the home page to avoid duplication and ensure consistency.
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Remove note about component usage frequency.
Add JSON-LD to our website to try to connect all of our different properties in Google's eyes
Important
Add JSON-LD structured data to homepage for SEO, update SEO title, and homepage URL.
StructuredDatacomponent instructured-data.tsxto render JSON-LD for SEO.StructuredDatacomponent inpage.tsx.seo.tsto "Roo Code – The AI dev team that gets things done".package.jsonto "https://roocode.com".This description was created by
for b2f273c. You can customize this summary. It will automatically update as commits are pushed.