GeezerVison is showing github.com — feat(marketing): help search engines tell t3.codes apart from copycat… · AndryHTC/t3code@59ec1ba
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/SECURITY.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | # Security policy | 2 | 2 |
| 3 | 3 | Report security vulnerabilities affecting T3 Code or T3 Tools-operated infrastructure to | 4 | | -[security@ping.gg](mailto:security@ping.gg). Please do not disclose them publicly until we have had | | 4 | +[security@t3.codes](mailto:security@t3.codes). Please do not disclose them publicly until we have had | 5 | 5 | a reasonable opportunity to investigate and remediate them. | 6 | 6 |
| 7 | 7 | See the [full security policy](https://t3.codes/security-policy) for reporting details, scope, | |
Collapse file Copy file name to clipboardExpand all lines: apps/marketing/astro.config.mjs +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,6 +8,8 @@ delete process.env.VP_RUN_NODE_CLIENT_PATH; | 8 | 8 |
| 9 | 9 | export default defineConfig({ | 10 | 10 | 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", | 11 | 13 | server: { | 12 | 14 | port: Number(process.env.PORT ?? 4173), | 13 | 15 | }, | |
Collapse file Copy file name to clipboard +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +User-agent: * | | 2 | +Allow: / | | 3 | + | | 4 | +Sitemap: https://t3.codes/sitemap.xml |
Collapse file Copy file name to clipboardExpand all lines: apps/marketing/src/layouts/Layout.astro +10-1Lines changed: 10 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,18 +9,25 @@ import { | 9 | 9 | IOS_APP_STORE_URL, | 10 | 10 | MARKETING_STATS, | 11 | 11 | } from "../lib/site"; | | 12 | +import { type JsonLd, jsonLdGraph, organizationJsonLd, websiteJsonLd } from "../lib/seo"; | 12 | 13 |
| 13 | 14 | interface Props { | 14 | 15 | title?: string; | 15 | 16 | description?: string; | 16 | 17 | pageClass?: string; | | 18 | + /** Page-specific schema.org nodes. Organization and WebSite are always included. */ | | 19 | + jsonLd?: ReadonlyArray<JsonLd>; | | 20 | + noindex?: boolean; | 17 | 21 | } | 18 | 22 |
| 19 | 23 | const { | 20 | 24 | title = "T3 Code", | 21 | 25 | description = "T3 Code. The open-source control plane for coding agents.", | 22 | 26 | pageClass, | | 27 | + jsonLd = [], | | 28 | + noindex = false, | 23 | 29 | } = Astro.props; | | 30 | +const structuredData = jsonLdGraph([organizationJsonLd(), websiteJsonLd(), ...jsonLd]); | 24 | 31 |
| 25 | 32 | // Link unfurlers require a 1200x630 JPG/PNG at an absolute URL. | 26 | 33 | const socialImage = await getImage({ | @@ -41,7 +48,7 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site); | 41 | 48 | <meta charset="UTF-8" /> | 42 | 49 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | 43 | 50 | <meta name="description" content={description} /> | 44 | | - <link rel="canonical" href={canonicalUrl} /> | | 51 | + {noindex ? <meta name="robots" content="noindex" /> : <link rel="canonical" href={canonicalUrl} />} | 45 | 52 | <meta property="og:type" content="website" /> | 46 | 53 | <meta property="og:site_name" content="T3 Code" /> | 47 | 54 | <meta property="og:url" content={canonicalUrl} /> | @@ -61,7 +68,9 @@ const canonicalUrl = new URL(Astro.url.pathname, Astro.site); | 61 | 68 | <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32" /> | 62 | 69 | <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16" /> | 63 | 70 | <link rel="apple-touch-icon" href="/apple-touch-icon.png" /> | | 71 | + <link rel="sitemap" type="application/xml" href="/sitemap.xml" /> | 64 | 72 | <title>{title}</title> | | 73 | + <script is:inline type="application/ld+json" set:html={structuredData} /> | 65 | 74 | </head> | 66 | 75 | <body> | 67 | 76 | <div class:list={["page", pageClass]}> | |
Collapse file Copy file name to clipboard +79Lines changed: 79 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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://discord.gg/jn4EGJjrvv", | | 14 | +] as const; | | 15 | + | | 16 | +export type JsonLd = Record<string, unknown>; | | 17 | + | | 18 | +const ORGANIZATION_ID = `${SITE_ORIGIN}/#organization`; | | 19 | +const WEBSITE_ID = `${SITE_ORIGIN}/#website`; | | 20 | +const SOFTWARE_ID = `${SITE_ORIGIN}/#software`; | | 21 | + | | 22 | +export const absoluteUrl = (pathname: string): string => new URL(pathname, SITE_ORIGIN).href; | | 23 | + | | 24 | +export const organizationJsonLd = (): JsonLd => ({ | | 25 | + "@type": "Organization", | | 26 | + "@id": ORGANIZATION_ID, | | 27 | + name: "T3 Tools Inc", | | 28 | + url: SITE_ORIGIN, | | 29 | + logo: absoluteUrl("/apple-touch-icon.png"), | | 30 | + sameAs: ["https://github.com/pingdotgg"], | | 31 | +}); | | 32 | + | | 33 | +export const websiteJsonLd = (): JsonLd => ({ | | 34 | + "@type": "WebSite", | | 35 | + "@id": WEBSITE_ID, | | 36 | + name: SITE_NAME, | | 37 | + url: SITE_ORIGIN, | | 38 | + publisher: { "@id": ORGANIZATION_ID }, | | 39 | +}); | | 40 | + | | 41 | +export const softwareJsonLd = (): JsonLd => ({ | | 42 | + "@type": "SoftwareApplication", | | 43 | + "@id": SOFTWARE_ID, | | 44 | + name: SITE_NAME, | | 45 | + description: `${SITE_NAME}. ${SITE_TAGLINE}.`, | | 46 | + url: SITE_ORIGIN, | | 47 | + downloadUrl: absoluteUrl("/download"), | | 48 | + applicationCategory: "DeveloperApplication", | | 49 | + operatingSystem: "macOS, Windows, Linux, iOS, Android", | | 50 | + license: "https://opensource.org/license/mit", | | 51 | + isAccessibleForFree: true, | | 52 | + offers: { "@type": "Offer", price: "0", priceCurrency: "USD" }, | | 53 | + publisher: { "@id": ORGANIZATION_ID }, | | 54 | + sameAs: [...OFFICIAL_PROFILES], | | 55 | +}); | | 56 | + | | 57 | +export const breadcrumbJsonLd = (items: ReadonlyArray<{ name: string; path: string }>): JsonLd => ({ | | 58 | + "@type": "BreadcrumbList", | | 59 | + itemListElement: items.map((item, index) => ({ | | 60 | + "@type": "ListItem", | | 61 | + position: index + 1, | | 62 | + name: item.name, | | 63 | + item: absoluteUrl(item.path), | | 64 | + })), | | 65 | +}); | | 66 | + | | 67 | +export const jsonLdGraph = (nodes: ReadonlyArray<JsonLd>): string => | | 68 | + // `<` is escaped so page text inside the graph can never close the script tag. | | 69 | + JSON.stringify({ "@context": "https://schema.org", "@graph": nodes }).replace(/</g, "\\u003c"); | | 70 | + | | 71 | +// Indexable static pages. The 404 (noindex) and the /95 easter egg stay out of the sitemap. | | 72 | +export const STATIC_PAGES = [ | | 73 | + { path: "/", priority: "1.0" }, | | 74 | + { path: "/download", priority: "0.9" }, | | 75 | + { path: "/legal", priority: "0.3" }, | | 76 | + { path: "/privacy-policy", priority: "0.3" }, | | 77 | + { path: "/security-policy", priority: "0.3" }, | | 78 | + { path: "/terms-of-service", priority: "0.3" }, | | 79 | +] as const; |
Collapse file Copy file name to clipboard +19Lines changed: 19 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +import type { APIRoute } from "astro"; | | 2 | + | | 3 | +import { absoluteUrl } from "../../lib/seo"; | | 4 | + | | 5 | +// RFC 9116 requires an Expires date. Deriving it from the build keeps the file valid as long as | | 6 | +// the site deploys at least once a year. | | 7 | +const ONE_YEAR_MS = 365 * 24 * 60 * 60 * 1000; | | 8 | + | | 9 | +export const GET: APIRoute = () => { | | 10 | + const body = [ | | 11 | + | | 12 | + `Policy: ${absoluteUrl("/security-policy")}`, | | 13 | + `Canonical: ${absoluteUrl("/.well-known/security.txt")}`, | | 14 | + "Preferred-Languages: en", | | 15 | + `Expires: ${new Date(Date.now() + ONE_YEAR_MS).toISOString()}`, | | 16 | + "", | | 17 | + ].join("\n"); | | 18 | + return new Response(body, { headers: { "Content-Type": "text/plain; charset=utf-8" } }); | | 19 | +}; |
Collapse file Copy file name to clipboard +44Lines changed: 44 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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> |
Collapse file Copy file name to clipboardExpand all lines: apps/marketing/src/pages/download.astro +12-1Lines changed: 12 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,6 +6,7 @@ import iconNightly from "../assets/icon-nightly.webp"; | 6 | 6 | import Layout from "../layouts/Layout.astro"; | 7 | 7 | import { RELEASES_URL } from "../lib/releases"; | 8 | 8 | import { ANDROID_PLAY_STORE_URL, IOS_APP_STORE_URL } from "../lib/site"; | | 9 | +import { breadcrumbJsonLd, softwareJsonLd } from "../lib/seo"; | 9 | 10 |
| 10 | 11 | const imageProps = { | 11 | 12 | alt: "", | @@ -16,7 +17,17 @@ const imageProps = { | 16 | 17 | } satisfies Partial<ComponentProps<typeof Image>>; | 17 | 18 | --- | 18 | 19 |
| 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 | +> | 20 | 31 | <div class="download-page" id="download-page" data-channel="stable"> | 21 | 32 | <header class="download-head"> | 22 | 33 | <div class="sky" aria-hidden="true"></div> | |
Collapse file Copy file name to clipboardExpand all lines: apps/marketing/src/pages/index.astro +5-1Lines changed: 5 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | MARKETING_STATS, | 10 | 10 | } from "../lib/site"; | 11 | 11 | import { tweets } from "../lib/tweets"; | | 12 | +import { softwareJsonLd } from "../lib/seo"; | 12 | 13 |
| 13 | 14 | const screenshot = await getImage({ | 14 | 15 | src: desktopScreenshot, | @@ -29,7 +30,10 @@ const mobileEndorsementRows = [ | 29 | 30 | ]; | 30 | 31 | --- | 31 | 32 |
| 32 | | -<Layout> | | 33 | +<Layout | | 34 | + title="T3 Code | The open-source control plane for coding agents" | | 35 | + jsonLd={[softwareJsonLd()]} | | 36 | +> | 33 | 37 | <section class="hero"> | 34 | 38 | <div class="hero-grid" aria-hidden="true"></div> | 35 | 39 |
| |
Collapse file Copy file name to clipboard +31Lines changed: 31 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 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 websites are https://t3.codes and the web app at https://app.t3.codes. Official builds come from ${absoluteUrl("/download")}, ${GITHUB_REPOSITORY_URL}/releases, the \`t3\` package on npm (\`npx t3@latest\`), the iOS App Store, and Google Play. Any other website 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 | +- [Web app](https://app.t3.codes): connect to a T3 Code server from a browser | | 18 | +- [Source code](${GITHUB_REPOSITORY_URL}): the MIT-licensed repository | | 19 | +- [Releases](${GITHUB_REPOSITORY_URL}/releases): release builds and changelogs | | 20 | +- [npm package](https://www.npmjs.com/package/t3): run \`npx t3@latest\` | | 21 | +- [iOS app](${IOS_APP_STORE_URL}) | | 22 | +- [Android app](${ANDROID_PLAY_STORE_URL}) | | 23 | +
| | 24 | +## Policies | | 25 | +
| | 26 | +- [Security policy](${absoluteUrl("/security-policy")}) | | 27 | +- [Privacy policy](${absoluteUrl("/privacy-policy")}) | | 28 | +- [Terms of service](${absoluteUrl("/terms-of-service")}) | | 29 | +`; | | 30 | + return new Response(body, { headers: { "Content-Type": "text/plain; charset=utf-8" } }); | | 31 | +}; |
|