Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

improve: align homepage SEO with visible content

Richie McIlroybc461de79a27
diff --git a/apps/web/__tests__/unit/homepage-seo.test.ts b/apps/web/__tests__/unit/homepage-seo.test.ts
new file mode 100644
index 000000000..aeaadf3cc
--- /dev/null
+++ b/apps/web/__tests__/unit/homepage-seo.test.ts
@@ -0,0 +1,84 @@
+import { readFileSync } from "node:fs";
+import { createElement } from "react";
+import { renderToStaticMarkup } from "react-dom/server";
+import { describe, expect, it } from "vitest";
+import robots from "@/app/robots";
+import { homePageMetadata } from "@/components/pages/HomeTwo/metadata";
+import { HomeTwoSchema } from "@/components/pages/HomeTwo/Schema";
+import { homepageSchema, homepageSeo } from "@/components/pages/HomeTwo/seo";
+import { PRICING } from "@/data/pricing";
+
+describe("homepage SEO", () => {
+ it("uses the public root as the crawlable canonical", async () => {
+ expect(homePageMetadata.alternates?.canonical).toBe("https://cap.so/");
+ expect(homePageMetadata.robots).toMatchObject({
+ index: true,
+ follow: true,
+ });
+ const policy = await robots();
+ const rules = Array.isArray(policy.rules) ? policy.rules : [policy.rules];
+ for (const rule of rules) {
+ if (rule.userAgent !== "*") continue;
+ const disallowed = Array.isArray(rule.disallow)
+ ? rule.disallow
+ : [rule.disallow];
+ expect(disallowed).not.toContain("/");
+ expect(disallowed).not.toContain("/home");
+ }
+ });
+
+ it("connects the website, page, software, and publisher without invented ratings", () => {
+ const graph = homepageSchema["@graph"];
+ const ids = new Set(graph.map((entity) => entity["@id"]));
+ expect(ids.size).toBe(graph.length);
+ const visit = (value: unknown) => {
+ if (Array.isArray(value)) {
+ value.forEach(visit);
+ } else if (value && typeof value === "object") {
+ if ("@id" in value) expect(ids.has(String(value["@id"]))).toBe(true);
+ Object.values(value).forEach(visit);
+ }
+ };
+ visit(graph);
+ const serialized = JSON.stringify(homepageSchema);
+ expect(serialized).not.toContain("aggregateRating");
+ expect(serialized).not.toContain("reviewRating");
+ expect(serialized).not.toContain("FAQPage");
+ expect(serialized).not.toContain("priceValidUntil");
+ });
+
+ it("uses the displayed plan prices and supported desktop platforms", () => {
+ const software = homepageSchema["@graph"].find(
+ (entity) => entity["@type"] === "SoftwareApplication",
+ );
+ expect(software?.operatingSystem).toEqual(["macOS", "Windows", "Linux"]);
+ expect(software?.offers).toMatchObject([
+ { name: "Cap Free", price: 0 },
+ { name: "Desktop License", price: PRICING.commercial.lifetime },
+ { name: "Cap Pro", price: PRICING.pro.monthly },
+ ]);
+ });
+
+ it("describes the actual logo dimensions", () => {
+ const logo = homepageSchema["@graph"].find(
+ (entity) => entity["@type"] === "Organization",
+ )?.logo;
+ const image = readFileSync(
+ new URL("../../public/cap-logo.png", import.meta.url),
+ );
+ expect(logo).toMatchObject({
+ width: image.readUInt32BE(16),
+ height: image.readUInt32BE(20),
+ });
+ });
+
+ it("renders valid JSON-LD with the same description as the search metadata", () => {
+ const html = renderToStaticMarkup(createElement(HomeTwoSchema));
+ const json = html.match(
+ /<script type="application\/ld\+json">(.*?)<\/script>/,
+ )?.[1];
+ expect(json).toBeDefined();
+ expect(JSON.parse(json ?? "")).toEqual(homepageSchema);
+ expect(homePageMetadata.description).toBe(homepageSeo.description);
+ });
+});
diff --git a/apps/web/app/(site)/home/page.tsx b/apps/web/app/(site)/home/page.tsx
index 386648600..838cd4835 100644
--- a/apps/web/app/(site)/home/page.tsx
+++ b/apps/web/app/(site)/home/page.tsx
@@ -2,13 +2,7 @@ import type { Metadata } from "next";
import { HomeTwoPage } from "@/components/pages/HomeTwo";
import { homePageMetadata } from "@/components/pages/HomeTwo/metadata";
-export const metadata: Metadata = {
- ...homePageMetadata,
- robots: {
- index: false,
- follow: false,
- },
-};
+export const metadata: Metadata = homePageMetadata;
export default function Home() {
return <HomeTwoPage />;
diff --git a/apps/web/app/robots.ts b/apps/web/app/robots.ts
index 6235fd71e..f23a43bdb 100644
--- a/apps/web/app/robots.ts
+++ b/apps/web/app/robots.ts
@@ -6,14 +6,7 @@ export default async function robots(): Promise<MetadataRoute.Robots> {
{
userAgent: "*",
allow: "/",
- disallow: [
- "/dashboard",
- "/login",
- "/invite",
- "/onboarding",
- "/record",
- "/home",
- ],
+ disallow: ["/dashboard", "/login", "/invite", "/onboarding", "/record"],
},
],
sitemap: "https://cap.so/sitemap.xml",
diff --git a/apps/web/components/pages/HomeTwo/Schema.tsx b/apps/web/components/pages/HomeTwo/Schema.tsx
new file mode 100644
index 000000000..4a328daea
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/Schema.tsx
@@ -0,0 +1,7 @@
+import { homepageSchema } from "./seo";
+
+export const HomeTwoSchema = () => (
+ <script type="application/ld+json">
+ {JSON.stringify(homepageSchema).replace(/</g, "\\u003c")}
+ </script>
+);
diff --git a/apps/web/components/pages/HomeTwo/index.tsx b/apps/web/components/pages/HomeTwo/index.tsx
index 186e3acc4..943387ad9 100644
--- a/apps/web/components/pages/HomeTwo/index.tsx
+++ b/apps/web/components/pages/HomeTwo/index.tsx
@@ -1,4 +1,3 @@
-import { HomePageSchema } from "@/components/pages/HomePage/HomePageSchema";
import { Agents } from "@/components/pages/HomeTwo/Agents";
import { DeepDives } from "@/components/pages/HomeTwo/DeepDives";
import { Faq } from "@/components/pages/HomeTwo/Faq";
@@ -14,6 +13,7 @@ import { Pricing } from "@/components/pages/HomeTwo/Pricing";
import { Testimonials } from "@/components/pages/HomeTwo/Testimonials";
import { BAND, CREAM, grainBg, SHELL } from "@/components/pages/HomeTwo/theme";
import { Workflow } from "@/components/pages/HomeTwo/Workflow";
+import { HomeTwoSchema } from "./Schema";
const CARD_RADIUS = "rounded-[24px]";
@@ -26,7 +26,7 @@ export function HomeTwoPage() {
className={`${htSans.className} ${htSans.variable} ${htSerif.variable} ${htMono.variable} text-[#111111]`}
style={grainBg(SHELL)}
>
- <HomePageSchema />
+ <HomeTwoSchema />
<div className="px-2.5 pb-2.5 pt-[68px] sm:px-4 sm:pb-4 lg:pt-[76px]">
<div
className={`${CARD_RADIUS} shadow-[0_0_0_1px_rgba(17,17,17,0.045)]`}
diff --git a/apps/web/components/pages/HomeTwo/metadata.ts b/apps/web/components/pages/HomeTwo/metadata.ts
index f020ef864..7386e8633 100644
--- a/apps/web/components/pages/HomeTwo/metadata.ts
+++ b/apps/web/components/pages/HomeTwo/metadata.ts
@@ -1,9 +1,25 @@
+import type { Metadata } from "next";
import { buildMarketingMetadata } from "@/lib/og/url";
+import { homepageSeo } from "./seo";
-export const homePageMetadata = buildMarketingMetadata({
- title: "Cap | The open source screen recorder",
- description:
- "Record, edit, and share beautiful screen recordings. Instant links, studio-grade editing, and screenshots in one open source app.",
- path: "/",
- ogTitle: "One app for every way you capture your screen",
-});
+export const homePageMetadata: Metadata = {
+ ...buildMarketingMetadata({
+ title: homepageSeo.title,
+ description: homepageSeo.description,
+ path: homepageSeo.url,
+ ogTitle: "Record. Edit. Share.",
+ ogDescription:
+ "The open source screen recorder for Mac, Windows, and Linux.",
+ }),
+ robots: {
+ index: true,
+ follow: true,
+ googleBot: {
+ index: true,
+ follow: true,
+ "max-image-preview": "large",
+ "max-snippet": -1,
+ "max-video-preview": -1,
+ },
+ },
+};
diff --git a/apps/web/components/pages/HomeTwo/seo.ts b/apps/web/components/pages/HomeTwo/seo.ts
new file mode 100644
index 000000000..9c5399114
--- /dev/null
+++ b/apps/web/components/pages/HomeTwo/seo.ts
@@ -0,0 +1,102 @@
+import { PRICING } from "@/data/pricing";
+
+export const homepageSeo = {
+ url: "https://cap.so/",
+ title: "Cap — Free Screen Recorder & Open Source Loom Alternative",
+ description:
+ "Cap is the free, open source screen recorder for Mac, Windows, and Linux. Record, edit, take screenshots, and share videos with a link.",
+} as const;
+
+export const homepageSchema = {
+ "@context": "https://schema.org",
+ "@graph": [
+ {
+ "@type": "Organization",
+ "@id": "https://cap.so/#organization",
+ name: "Cap",
+ url: homepageSeo.url,
+ logo: {
+ "@type": "ImageObject",
+ url: "https://cap.so/cap-logo.png",
+ width: 1459,
+ height: 480,
+ },
+ sameAs: [
+ "https://github.com/CapSoftware/Cap",
+ "https://x.com/cap",
+ "https://www.linkedin.com/company/caprecorder/",
+ ],
+ contactPoint: {
+ "@type": "ContactPoint",
+ email: "[email protected]",
+ contactType: "customer support",
+ },
+ },
+ {
+ "@type": "WebSite",
+ "@id": "https://cap.so/#website",
+ name: "Cap",
+ url: homepageSeo.url,
+ publisher: { "@id": "https://cap.so/#organization" },
+ inLanguage: "en",
+ },
+ {
+ "@type": "WebPage",
+ "@id": "https://cap.so/#webpage",
+ url: homepageSeo.url,
+ name: homepageSeo.title,
+ description: homepageSeo.description,
+ isPartOf: { "@id": "https://cap.so/#website" },
+ mainEntity: { "@id": "https://cap.so/#software" },
+ inLanguage: "en",
+ },
+ {
+ "@type": "SoftwareApplication",
+ "@id": "https://cap.so/#software",
+ name: "Cap",
+ url: homepageSeo.url,
+ description: homepageSeo.description,
+ applicationCategory: "MultimediaApplication",
+ operatingSystem: ["macOS", "Windows", "Linux"],
+ downloadUrl: "https://cap.so/download",
+ publisher: { "@id": "https://cap.so/#organization" },
+ mainEntityOfPage: { "@id": "https://cap.so/#webpage" },
+ featureList: [
+ "Screen, webcam, and audio recording",
+ "Instant video sharing",
+ "Local recording with a built-in video editor",
+ "Screenshot capture and annotation",
+ "Custom backgrounds and automatic zoom",
+ "Google Drive and S3 storage integrations",
+ "Open source and self-hostable",
+ ],
+ offers: [
+ {
+ "@type": "Offer",
+ name: "Cap Free",
+ price: 0,
+ priceCurrency: "USD",
+ url: "https://cap.so/download",
+ description: "Free local recording and editing for personal use.",
+ },
+ {
+ "@type": "Offer",
+ name: "Desktop License",
+ price: PRICING.commercial.lifetime,
+ priceCurrency: "USD",
+ url: "https://cap.so/pricing",
+ description: "One-time desktop license for commercial use.",
+ },
+ {
+ "@type": "Offer",
+ name: "Cap Pro",
+ price: PRICING.pro.monthly,
+ priceCurrency: "USD",
+ url: "https://cap.so/pricing",
+ description:
+ "Per user, billed monthly. Annual billing is also available.",
+ },
+ ],
+ },
+ ],
+};
diff --git a/apps/web/data/homepage-copy.ts b/apps/web/data/homepage-copy.ts
index 921b3f6cf..8b199734e 100644
--- a/apps/web/data/homepage-copy.ts
+++ b/apps/web/data/homepage-copy.ts
@@ -371,7 +371,7 @@ export const homepageCopy: HomePageCopy = {
{
question: "How long can I record for on the free version?",
answer:
- "You can record for 5 minutes on the free version. After that, you'll need to upgrade to a paid plan.",
+ "Studio Mode lets you record locally without a time limit. Free cloud shareable links are limited to 5 minutes each.",
},
{
question: "How does Cap AI work?",
@@ -396,7 +396,7 @@ export const homepageCopy: HomePageCopy = {
{
question: "Which platforms do you support?",
answer:
- "Native desktop apps for macOS (Apple Silicon & Intel) and Windows. View your shareable links from anywhere.",
+ "Native desktop apps for macOS (Apple Silicon & Intel), Windows, and Linux, plus a Chrome extension. View your shareable links from anywhere.",
},
{
question: "Can I use Cap for commercial purposes?",
@@ -406,7 +406,7 @@ export const homepageCopy: HomePageCopy = {
{
question: "Is my data secure?",
answer:
- "Security is core to Cap. Cap is SOC 2 Type II, ISO 27001, and HIPAA compliant, and as an open source project, our code is fully auditable and transparent — you can see exactly how your data is handled. End-to-end encryption for cloud storage, option to use your own infrastructure, and community-driven security reviews keep your content safe.",
+ "Security is core to Cap. Cap is SOC 2 Type II, ISO 27001, and HIPAA compliant, and as an open source project, our code is fully auditable and transparent — you can see exactly how your data is handled. You can connect your own storage or self-host Cap for more control over your recordings.",
},
{
question: "What about SOC 2, ISO 27001, GDPR, and HIPAA compliance?",