Skip to content

Commit f8ed7a7

Browse files
Add structured data to the homepage (#8427)
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
1 parent 3e47e88 commit f8ed7a7

File tree

5 files changed

+157
-2
lines changed

5 files changed

+157
-2
lines changed

apps/web-roo-code/src/app/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from "@/components/homepage"
1515
import { EXTERNAL_LINKS } from "@/lib/constants"
1616
import { ArrowRight } from "lucide-react"
17+
import { StructuredData } from "@/components/structured-data"
1718

1819
// Invalidate cache when a request comes in, at most once every hour.
1920
export const revalidate = 3600
@@ -23,6 +24,7 @@ export default async function Home() {
2324

2425
return (
2526
<>
27+
<StructuredData />
2628
<section className="relative flex h-[calc(125vh-theme(spacing.12))] items-center overflow-hidden md:h-[calc(80svh-theme(spacing.12))]">
2729
<AnimatedBackground />
2830
<div className="container relative flex items-center h-full z-10 mx-auto px-4 sm:px-6 lg:px-8">
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { getStructuredData } from "@/lib/structured-data"
2+
3+
/**
4+
* StructuredData Component
5+
*
6+
* Renders JSON-LD structured data in the document head for SEO.
7+
*
8+
* The structured data includes:
9+
* - Organization information (brand, logo, social profiles)
10+
* - WebSite metadata (site name for Google Search)
11+
* - SoftwareApplication details (VS Code extension)
12+
*
13+
* @see https://developers.google.com/search/docs/appearance/structured-data/intro-structured-data
14+
*/
15+
export function StructuredData() {
16+
const structuredData = getStructuredData()
17+
18+
return (
19+
<script
20+
type="application/ld+json"
21+
dangerouslySetInnerHTML={{
22+
__html: JSON.stringify(structuredData),
23+
}}
24+
/>
25+
)
26+
}

apps/web-roo-code/src/lib/seo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL ?? "https://roocode.com"
33
export const SEO = {
44
url: SITE_URL,
55
name: "Roo Code",
6-
title: "Roo Code – Your AI-Powered Dev Team in VS Code and Beyond",
6+
title: "Roo Code – The AI dev team that gets things done",
77
description:
88
"Roo Code puts an entire AI dev team right in your editor, outpacing closed tools with deep project-wide context, multi-step agentic coding, and unmatched developer-centric flexibility.",
99
locale: "en_US",
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import { SEO } from "./seo"
2+
import { EXTERNAL_LINKS } from "./constants"
3+
4+
/**
5+
* Type definitions for Schema.org structured data
6+
*/
7+
interface ImageObject {
8+
"@type": "ImageObject"
9+
url: string
10+
width: number
11+
height: number
12+
}
13+
14+
interface Organization {
15+
"@type": "Organization"
16+
"@id": string
17+
name: string
18+
url: string
19+
logo: ImageObject
20+
alternateName: string[]
21+
sameAs: string[]
22+
}
23+
24+
interface WebSite {
25+
"@type": "WebSite"
26+
"@id": string
27+
url: string
28+
name: string
29+
alternateName: string[]
30+
publisher: { "@id": string }
31+
}
32+
33+
interface SoftwareApplication {
34+
"@type": "SoftwareApplication"
35+
"@id": string
36+
name: string
37+
applicationCategory: string
38+
operatingSystem: string
39+
url: string
40+
downloadUrl: string
41+
offers: {
42+
"@type": "Offer"
43+
price: string
44+
priceCurrency: string
45+
}
46+
isAccessibleForFree: boolean
47+
publisher: { "@id": string }
48+
}
49+
50+
interface StructuredDataGraph {
51+
"@context": "https://schema.org"
52+
"@graph": [Organization, WebSite, SoftwareApplication]
53+
}
54+
55+
/**
56+
* Generates the complete JSON-LD structured data for SEO
57+
*
58+
* This includes:
59+
* - Organization schema (brand identity, logo, social profiles)
60+
* - WebSite schema (site name for Google Search)
61+
* - SoftwareApplication schema (VS Code extension metadata)
62+
*
63+
* @returns Complete structured data object ready for JSON-LD injection
64+
*/
65+
export function getStructuredData(): StructuredDataGraph {
66+
// Organization ID - used to link all entities
67+
const orgId = `${SEO.url}#org`
68+
69+
const organization: Organization = {
70+
"@type": "Organization",
71+
"@id": orgId,
72+
name: SEO.name,
73+
url: SEO.url,
74+
logo: {
75+
"@type": "ImageObject",
76+
url: `${SEO.url}/android-chrome-512x512.png`,
77+
width: 512,
78+
height: 512,
79+
},
80+
alternateName: ["RooCode"],
81+
sameAs: [
82+
EXTERNAL_LINKS.GITHUB,
83+
EXTERNAL_LINKS.MARKETPLACE,
84+
EXTERNAL_LINKS.X,
85+
EXTERNAL_LINKS.LINKEDIN,
86+
EXTERNAL_LINKS.REDDIT,
87+
EXTERNAL_LINKS.DISCORD,
88+
EXTERNAL_LINKS.YOUTUBE,
89+
],
90+
}
91+
92+
const website: WebSite = {
93+
"@type": "WebSite",
94+
"@id": `${SEO.url}#website`,
95+
url: SEO.url,
96+
name: SEO.name,
97+
alternateName: ["RooCode"],
98+
publisher: { "@id": orgId },
99+
}
100+
101+
const softwareApplication: SoftwareApplication = {
102+
"@type": "SoftwareApplication",
103+
"@id": `${SEO.url}#vscode-extension`,
104+
name: "Roo Code (VS Code extension)",
105+
applicationCategory: "DeveloperApplication",
106+
operatingSystem: "Windows, macOS, Linux",
107+
url: SEO.url,
108+
downloadUrl: EXTERNAL_LINKS.MARKETPLACE,
109+
offers: {
110+
"@type": "Offer",
111+
price: "0",
112+
priceCurrency: "USD",
113+
},
114+
isAccessibleForFree: true,
115+
publisher: { "@id": orgId },
116+
}
117+
118+
return {
119+
"@context": "https://schema.org",
120+
"@graph": [organization, website, softwareApplication],
121+
}
122+
}
123+
124+
/**
125+
* Type export for use in components
126+
*/
127+
export type { StructuredDataGraph }

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"type": "git",
2121
"url": "https://github.com/RooCodeInc/Roo-Code"
2222
},
23-
"homepage": "https://github.com/RooCodeInc/Roo-Code",
23+
"homepage": "https://roocode.com",
2424
"categories": [
2525
"AI",
2626
"Chat",

0 commit comments

Comments
 (0)