diff --git a/packages/stats/app/src/app.tsx b/packages/stats/app/src/app.tsx
index 976633f295..1d46cb782f 100644
--- a/packages/stats/app/src/app.tsx
+++ b/packages/stats/app/src/app.tsx
@@ -7,8 +7,8 @@ import "./app.css"
function AppMeta() {
return (
<>
-
opencode stats
-
+ OpenCode Stats
+
>
)
}
diff --git a/packages/stats/app/src/asset/unfurl-rankings.png b/packages/stats/app/src/asset/unfurl-rankings.png
new file mode 100644
index 0000000000..872cb6073d
Binary files /dev/null and b/packages/stats/app/src/asset/unfurl-rankings.png differ
diff --git a/packages/stats/app/src/routes/index.tsx b/packages/stats/app/src/routes/index.tsx
index a3573278ae..3590472106 100644
--- a/packages/stats/app/src/routes/index.tsx
+++ b/packages/stats/app/src/routes/index.tsx
@@ -6,6 +6,7 @@ import ibmPlexMonoMediumLatin1 from "@ibm/plex/IBM-Plex-Mono/fonts/split/woff2/I
import ibmPlexMonoSemiBoldLatin1 from "@ibm/plex/IBM-Plex-Mono/fonts/split/woff2/IBMPlexMono-SemiBold-Latin1.woff2?url"
import ibmPlexMonoBoldLatin1 from "@ibm/plex/IBM-Plex-Mono/fonts/split/woff2/IBMPlexMono-Bold-Latin1.woff2?url"
import opencodeWordmarkDark from "../asset/logo-ornate-dark.svg"
+import statsUnfurlRankings from "../asset/unfurl-rankings.png?url"
import {
getStatsHomeData,
type LeaderboardEntry,
@@ -30,6 +31,10 @@ const rangeLabels: Record = {
"1M": "1 Month",
"2M": "2 Months",
}
+const statsHomeTitle = "OpenCode Stats"
+const statsHomeDescription = "OpenCode usage, market share, token cost, and session cost stats."
+const statsHomeFallbackUrl = "https://stats.opencode.ai"
+const statsUnfurlAlt = "OpenCode Stats wordmark on a dark patterned background"
const headerLinks = [
{ href: "#top-models", label: "Top Models" },
{ href: "#leaderboard", label: "Leaderboard" },
@@ -90,17 +95,36 @@ const getGitHubStars = query(async () => {
}, "getGitHubStars")
export default function StatsHome() {
- getRequestEvent()?.response.headers.set(
- "Cache-Control",
- "public, max-age=60, s-maxage=300, stale-while-revalidate=86400",
- )
+ const event = getRequestEvent()
+ event?.response.headers.set("Cache-Control", "public, max-age=60, s-maxage=300, stale-while-revalidate=86400")
+ const statsHomeUrl = new URL(
+ import.meta.env.BASE_URL,
+ event?.request.url ?? (typeof window === "undefined" ? statsHomeFallbackUrl : window.location.href),
+ ).toString()
+ const statsUnfurlUrl = new URL(statsUnfurlRankings, statsHomeUrl).toString()
const data = createAsync(() => getData())
const githubStars = createAsync(() => getGitHubStars())
return (
- OpenCode Stats
-
+ {statsHomeTitle}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+