Skip to content
74 linesCodeBlameRaw
1/**
2 * Schema.org JSON-LD for the pages that say what g1t is and what it costs,
3 * so search engines and AI assistants read it without parsing the prose.
4 * Each is a `script:ld+json` meta descriptor, added after `page(…)`.
5 */
6import type { MetaDescriptor } from "react-router";
7
8import { COMPANY } from "./legal";
9import { DESCRIPTION, SITE } from "./meta";
10
11export function organization(): MetaDescriptor {
12 return {
13 "script:ld+json": {
14 "@context": "https://schema.org",
15 "@type": "Organization",
16 name: COMPANY.name,
17 url: COMPANY.url,
18 brand: { "@type": "Brand", name: "g1t", url: SITE },
19 },
20 };
21}
22
23/** g1t as an application, with the plan's monthly price per workspace. */
24export function application(monthlyDollars: number): MetaDescriptor {
25 return {
26 "script:ld+json": {
27 "@context": "https://schema.org",
28 "@type": "SoftwareApplication",
29 name: "g1t",
30 url: SITE,
31 applicationCategory: "DeveloperApplication",
32 operatingSystem: "Web",
33 description: DESCRIPTION,
34 publisher: { "@type": "Organization", name: COMPANY.name, url: COMPANY.url },
35 license: "https://opensource.org/licenses/MIT",
36 offers: [
37 {
38 "@type": "Offer",
39 name: "Free",
40 price: "0",
41 priceCurrency: "USD",
42 description: "Chat and the forge, with no card.",
43 },
44 {
45 "@type": "Offer",
46 name: "The g1t plan",
47 price: String(monthlyDollars),
48 priceCurrency: "USD",
49 description: "A month per workspace, never per seat, with $10 of usage included.",
50 priceSpecification: {
51 "@type": "UnitPriceSpecification",
52 price: String(monthlyDollars),
53 priceCurrency: "USD",
54 unitText: "month per workspace",
55 },
56 },
57 ],
58 },
59 };
60}
61
62export function faqPage(questions: { q: string; a: string }[]): MetaDescriptor {
63 return {
64 "script:ld+json": {
65 "@context": "https://schema.org",
66 "@type": "FAQPage",
67 mainEntity: questions.map((item) => ({
68 "@type": "Question",
69 name: item.q,
70 acceptedAnswer: { "@type": "Answer", text: item.a },
71 })),
72 },
73 };
74}