Skip to content

Commit 8540c03

Browse files
Victor Romoclaude
authored andcommitted
marketing: add crawl and entity signals for t3.codes
Add sitemap.xml, robots.txt, llms.txt, and security.txt. Add Organization, WebSite, SoftwareApplication, and BreadcrumbList JSON-LD with sameAs links to the official repository, app store listings, and channels. Add a noindex 404 page that points to the official download. Collapse trailing-slash duplicates (/download/ and /download both returned 200). Give the home and download pages descriptive titles. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9e85538 commit 8540c03

11 files changed

Lines changed: 244 additions & 4 deletions

File tree

‎apps/marketing/astro.config.mjs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ delete process.env.VP_RUN_NODE_CLIENT_PATH;
88

99
export default defineConfig({
1010
site: "https://t3.codes",
11+
// Vercel 308s `/path/` to `/path` (see vercel.ts), so every internal link and canonical uses one form.
12+
trailingSlash: "never",
1113
server: {
1214
port: Number(process.env.PORT ?? 4173),
1315
},
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Contact: mailto:[email protected]
2+
Policy: https://t3.codes/security-policy
3+
Canonical: https://t3.codes/.well-known/security.txt
4+
Preferred-Languages: en
5+
Expires: 2027-11-01T00:00:00.000Z

‎apps/marketing/src/layouts/Layout.astro‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,27 @@ import {
99
IOS_APP_STORE_URL,
1010
MARKETING_STATS,
1111
} from "../lib/site";
12+
import { type JsonLd, jsonLdGraph, organizationJsonLd, websiteJsonLd } from "../lib/seo";
1213
1314
interface Props {
1415
title?: string;
1516
description?: string;
1617
pageClass?: string;
18+
/** Page-specific schema.org nodes. Organization and WebSite are always included. */
19+
jsonLd?: ReadonlyArray<JsonLd>;
20+
ogType?: "website" | "article";
21+
noindex?: boolean;
1722
}
1823
1924
const {
2025
title = "T3 Code",
2126
description = "T3 Code. The open-source control plane for coding agents.",
2227
pageClass,
28+
jsonLd = [],
29+
ogType = "website",
30+
noindex = false,
2331
} = Astro.props;
32+
const structuredData = jsonLdGraph([organizationJsonLd(), websiteJsonLd(), ...jsonLd]);
2433
2534
// Link unfurlers require a 1200x630 JPG/PNG at an absolute URL.
2635
const socialImage = await getImage({
@@ -41,8 +50,8 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
4150
<meta charset="UTF-8" />
4251
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
4352
<meta name="description" content={description} />
44-
<link rel="canonical" href={canonicalUrl} />
45-
<meta property="og:type" content="website" />
53+
{noindex ? <meta name="robots" content="noindex" /> : <link rel="canonical" href={canonicalUrl} />}
54+
<meta property="og:type" content={ogType} />
4655
<meta property="og:site_name" content="T3 Code" />
4756
<meta property="og:url" content={canonicalUrl} />
4857
<meta property="og:title" content={title} />
@@ -61,7 +70,10 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site);
6170
<link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" />
6271
<link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" />
6372
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
73+
<link rel="sitemap" type="application/xml" href="/sitemap.xml" />
6474
<title>{title}</title>
75+
<script type="application/ld+json" set:html={structuredData} />
76+
<slot name="head" />
6577
</head>
6678
<body>
6779
<div class:list={["page", pageClass]}>

‎apps/marketing/src/lib/seo.ts‎

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import { ANDROID_PLAY_STORE_URL, GITHUB_REPOSITORY_URL, IOS_APP_STORE_URL } from "./site";
2+
3+
export const SITE_ORIGIN = "https://t3.codes";
4+
export const SITE_NAME = "T3 Code";
5+
export const SITE_TAGLINE = "The open-source control plane for coding agents";
6+
7+
// The canonical set of official properties. Search engines and AI answer engines read `sameAs`
8+
// to tie an entity to its real homes, which is the signal a look-alike domain cannot copy.
9+
export const OFFICIAL_PROFILES = [
10+
GITHUB_REPOSITORY_URL,
11+
IOS_APP_STORE_URL,
12+
ANDROID_PLAY_STORE_URL,
13+
"https://x.com/t3dotgg",
14+
"https://www.youtube.com/@t3dotgg",
15+
"https://discord.gg/jn4EGJjrvv",
16+
] as const;
17+
18+
export type JsonLd = Record<string, unknown>;
19+
20+
const ORGANIZATION_ID = `${SITE_ORIGIN}/#organization`;
21+
const WEBSITE_ID = `${SITE_ORIGIN}/#website`;
22+
const SOFTWARE_ID = `${SITE_ORIGIN}/#software`;
23+
24+
export const absoluteUrl = (pathname: string): string => new URL(pathname, SITE_ORIGIN).href;
25+
26+
export const organizationJsonLd = (): JsonLd => ({
27+
"@type": "Organization",
28+
"@id": ORGANIZATION_ID,
29+
name: "T3 Tools Inc",
30+
url: SITE_ORIGIN,
31+
logo: absoluteUrl("/apple-touch-icon.png"),
32+
sameAs: [
33+
"https://x.com/t3dotgg",
34+
"https://www.youtube.com/@t3dotgg",
35+
"https://github.com/pingdotgg",
36+
],
37+
});
38+
39+
export const websiteJsonLd = (): JsonLd => ({
40+
"@type": "WebSite",
41+
"@id": WEBSITE_ID,
42+
name: SITE_NAME,
43+
url: SITE_ORIGIN,
44+
publisher: { "@id": ORGANIZATION_ID },
45+
});
46+
47+
export const softwareJsonLd = (): JsonLd => ({
48+
"@type": "SoftwareApplication",
49+
"@id": SOFTWARE_ID,
50+
name: SITE_NAME,
51+
description: `${SITE_NAME}. ${SITE_TAGLINE}.`,
52+
url: SITE_ORIGIN,
53+
downloadUrl: absoluteUrl("/download"),
54+
applicationCategory: "DeveloperApplication",
55+
operatingSystem: "macOS, Windows, Linux, iOS, Android",
56+
license: "https://opensource.org/license/mit",
57+
isAccessibleForFree: true,
58+
offers: { "@type": "Offer", price: "0", priceCurrency: "USD" },
59+
codeRepository: GITHUB_REPOSITORY_URL,
60+
publisher: { "@id": ORGANIZATION_ID },
61+
sameAs: [...OFFICIAL_PROFILES],
62+
});
63+
64+
export const breadcrumbJsonLd = (items: ReadonlyArray<{ name: string; path: string }>): JsonLd => ({
65+
"@type": "BreadcrumbList",
66+
itemListElement: items.map((item, index) => ({
67+
"@type": "ListItem",
68+
position: index + 1,
69+
name: item.name,
70+
item: absoluteUrl(item.path),
71+
})),
72+
});
73+
74+
export const jsonLdGraph = (nodes: ReadonlyArray<JsonLd>): string =>
75+
// `<` is escaped so page text inside the graph can never close the script tag.
76+
JSON.stringify({ "@context": "https://schema.org", "@graph": nodes }).replace(/</g, "\\u003c");
77+
78+
// Indexable static pages. The 404 (noindex) and the /95 easter egg stay out of the sitemap.
79+
export const STATIC_PAGES = [
80+
{ path: "/", priority: "1.0" },
81+
{ path: "/download", priority: "0.9" },
82+
{ path: "/legal", priority: "0.3" },
83+
{ path: "/privacy-policy", priority: "0.3" },
84+
{ path: "/security-policy", priority: "0.3" },
85+
{ path: "/terms-of-service", priority: "0.3" },
86+
] as const;

‎apps/marketing/src/pages/404.astro‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
import Layout from "../layouts/Layout.astro";
3+
---
4+
5+
<Layout title="Page not found | T3 Code" description="This page does not exist on t3.codes." noindex>
6+
<section class="not-found container">
7+
<p class="eyebrow">404</p>
8+
<h1 class="display">This page does not exist.</h1>
9+
<p class="not-found-lede">
10+
t3.codes is the only official T3 Code website. Download builds from this site, GitHub releases,
11+
or the app stores.
12+
</p>
13+
<div class="not-found-actions">
14+
<a class="btn btn-primary btn-lg" href="/download">Download T3 Code</a>
15+
<a class="btn btn-ghost btn-lg" href="/">Home</a>
16+
</div>
17+
</section>
18+
</Layout>
19+
20+
<style>
21+
.not-found {
22+
padding-top: 18vh;
23+
padding-bottom: 18vh;
24+
max-width: 720px;
25+
}
26+
27+
.not-found h1 {
28+
margin: 14px 0 18px;
29+
font-size: clamp(2.25rem, 5vw, 3.5rem);
30+
}
31+
32+
.not-found-lede {
33+
color: var(--fg-muted);
34+
font-size: 1.05rem;
35+
line-height: 1.7;
36+
}
37+
38+
.not-found-actions {
39+
display: flex;
40+
flex-wrap: wrap;
41+
gap: 12px;
42+
margin-top: 32px;
43+
}
44+
</style>

‎apps/marketing/src/pages/download.astro‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import iconNightly from "../assets/icon-nightly.webp";
66
import Layout from "../layouts/Layout.astro";
77
import { RELEASES_URL } from "../lib/releases";
88
import { ANDROID_PLAY_STORE_URL, IOS_APP_STORE_URL } from "../lib/site";
9+
import { breadcrumbJsonLd, softwareJsonLd } from "../lib/seo";
910
1011
const imageProps = {
1112
alt: "",
@@ -16,7 +17,17 @@ const imageProps = {
1617
} satisfies Partial<ComponentProps<typeof Image>>;
1718
---
1819

19-
<Layout title="Download | T3 Code" description="Download T3 Code for macOS, Windows, or Linux.">
20+
<Layout
21+
title="Download T3 Code for macOS, Windows, and Linux | T3 Code"
22+
description="Download the official T3 Code desktop app for macOS, Windows, or Linux, or get the iOS and Android apps. t3.codes is the only official download site."
23+
jsonLd={[
24+
softwareJsonLd(),
25+
breadcrumbJsonLd([
26+
{ name: "T3 Code", path: "/" },
27+
{ name: "Download", path: "/download" },
28+
]),
29+
]}
30+
>
2031
<div class="download-page" id="download-page" data-channel="stable">
2132
<header class="download-head">
2233
<div class="sky" aria-hidden="true"></div>

‎apps/marketing/src/pages/index.astro‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
MARKETING_STATS,
1010
} from "../lib/site";
1111
import { tweets } from "../lib/tweets";
12+
import { softwareJsonLd } from "../lib/seo";
1213
1314
const screenshot = await getImage({
1415
src: desktopScreenshot,
@@ -29,7 +30,10 @@ const mobileEndorsementRows = [
2930
];
3031
---
3132

32-
<Layout>
33+
<Layout
34+
title="T3 Code | The open-source control plane for coding agents"
35+
jsonLd={[softwareJsonLd()]}
36+
>
3337
<section class="hero">
3438
<div class="hero-grid" aria-hidden="true"></div>
3539

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { APIRoute } from "astro";
2+
3+
import { ANDROID_PLAY_STORE_URL, GITHUB_REPOSITORY_URL, IOS_APP_STORE_URL } from "../lib/site";
4+
import { absoluteUrl, SITE_TAGLINE } from "../lib/seo";
5+
6+
// https://llmstxt.org: a plain index that tells AI agents which domain and links are official.
7+
export const GET: APIRoute = () => {
8+
const body = `# T3 Code
9+
10+
> ${SITE_TAGLINE}. T3 Code is free, MIT-licensed, and built by T3 Tools Inc. It runs Claude Code, Codex, Cursor, OpenCode, Grok, Antigravity, and other coding agents from one desktop, web, and mobile app.
11+
12+
The only official website is https://t3.codes. Official builds come from ${absoluteUrl("/download")}, ${GITHUB_REPOSITORY_URL}/releases, the iOS App Store, and Google Play. Any other domain that offers a T3 Code download is not affiliated with T3 Tools Inc.
13+
14+
## Official links
15+
16+
- [Download T3 Code](${absoluteUrl("/download")}): macOS, Windows, and Linux installers
17+
- [Source code](${GITHUB_REPOSITORY_URL}): the MIT-licensed repository
18+
- [Releases](${GITHUB_REPOSITORY_URL}/releases): signed release builds and changelogs
19+
- [iOS app](${IOS_APP_STORE_URL})
20+
- [Android app](${ANDROID_PLAY_STORE_URL})
21+
22+
## Policies
23+
24+
- [Security policy](${absoluteUrl("/security-policy")})
25+
- [Privacy policy](${absoluteUrl("/privacy-policy")})
26+
- [Terms of service](${absoluteUrl("/terms-of-service")})
27+
`;
28+
return new Response(body, { headers: { "Content-Type": "text/plain; charset=utf-8" } });
29+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { APIRoute } from "astro";
2+
3+
import { absoluteUrl } from "../lib/seo";
4+
5+
// Answer engines (ChatGPT search, Claude, Perplexity) cite what their crawlers can fetch.
6+
// Naming them keeps a future blanket rule from silently locking out the official site.
7+
const ANSWER_ENGINE_AGENTS = [
8+
"OAI-SearchBot",
9+
"ChatGPT-User",
10+
"GPTBot",
11+
"Claude-SearchBot",
12+
"Claude-User",
13+
"ClaudeBot",
14+
"PerplexityBot",
15+
"Bingbot",
16+
"Googlebot",
17+
];
18+
19+
export const GET: APIRoute = () => {
20+
const body = [
21+
...ANSWER_ENGINE_AGENTS.flatMap((agent) => [`User-agent: ${agent}`, "Allow: /", ""]),
22+
"User-agent: *",
23+
"Allow: /",
24+
"",
25+
`Sitemap: ${absoluteUrl("/sitemap.xml")}`,
26+
"",
27+
].join("\n");
28+
return new Response(body, { headers: { "Content-Type": "text/plain; charset=utf-8" } });
29+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { APIRoute } from "astro";
2+
3+
import { absoluteUrl, STATIC_PAGES } from "../lib/seo";
4+
5+
export const GET: APIRoute = () => {
6+
const urls = STATIC_PAGES.map(
7+
(page) =>
8+
` <url><loc>${absoluteUrl(page.path)}</loc><priority>${page.priority}</priority></url>`,
9+
);
10+
const body = `<?xml version="1.0" encoding="UTF-8"?>
11+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
12+
${urls.join("\n")}
13+
</urlset>
14+
`;
15+
return new Response(body, { headers: { "Content-Type": "application/xml; charset=utf-8" } });
16+
};

0 commit comments

Comments
 (0)