Skip to content

Commit f252ee8

Browse files
committed
Add /developer-documentation-videos landing page
1 parent e30aaba commit f252ee8

File tree

5 files changed

+570
-0
lines changed

5 files changed

+570
-0
lines changed
Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
import { readFileSync } from "node:fs";
2+
import { join } from "node:path";
3+
import { describe, expect, it } from "vitest";
4+
import { createFAQSchema } from "@/utils/web-schema";
5+
6+
const pageSource = readFileSync(
7+
join(
8+
process.cwd(),
9+
"app/(site)/(seo)/developer-documentation-videos/page.tsx",
10+
),
11+
"utf-8",
12+
);
13+
14+
const componentSource = readFileSync(
15+
join(
16+
process.cwd(),
17+
"components/pages/seo/DeveloperDocumentationVideosPage.tsx",
18+
),
19+
"utf-8",
20+
);
21+
22+
describe("DeveloperDocumentationVideosPage metadata", () => {
23+
it("contains canonical URL", () => {
24+
expect(pageSource).toContain(
25+
'canonical: "https://cap.so/developer-documentation-videos"',
26+
);
27+
});
28+
29+
it("contains OG url field", () => {
30+
expect(pageSource).toContain(
31+
'url: "https://cap.so/developer-documentation-videos"',
32+
);
33+
});
34+
35+
it("contains OG siteName field", () => {
36+
expect(pageSource).toContain('siteName: "Cap"');
37+
});
38+
39+
it("contains OG locale field", () => {
40+
expect(pageSource).toContain('locale: "en_US"');
41+
});
42+
43+
it("contains full OG image URL", () => {
44+
expect(pageSource).toContain('"https://cap.so/og.png"');
45+
});
46+
47+
it("title targets developer documentation videos keyword", () => {
48+
expect(pageSource.toLowerCase()).toContain("developer documentation");
49+
});
50+
});
51+
52+
describe("DeveloperDocumentationVideosPage component content", () => {
53+
it("targets developer documentation keyword in title", () => {
54+
expect(componentSource.toLowerCase()).toContain("developer documentation");
55+
});
56+
57+
it("includes comparison table", () => {
58+
expect(componentSource).toContain("comparisonTable");
59+
});
60+
61+
it("includes recording modes section", () => {
62+
expect(componentSource).toContain("recordingModes");
63+
});
64+
65+
it("mentions API demos", () => {
66+
expect(componentSource.toLowerCase()).toContain("api demo");
67+
});
68+
69+
it("mentions SDK walkthroughs", () => {
70+
expect(componentSource.toLowerCase()).toContain("sdk");
71+
});
72+
73+
it("includes migration guide", () => {
74+
expect(componentSource).toContain("migrationGuide");
75+
});
76+
77+
it("mentions 4K resolution", () => {
78+
expect(componentSource).toContain("4K");
79+
});
80+
81+
it("has badge set", () => {
82+
expect(componentSource).toContain("badge");
83+
});
84+
85+
it("references self-hosted-screen-recording internal link", () => {
86+
expect(componentSource).toContain("/self-hosted-screen-recording");
87+
});
88+
89+
it("references open-source-screen-recorder internal link", () => {
90+
expect(componentSource).toContain("/open-source-screen-recorder");
91+
});
92+
93+
it("references solutions/employee-onboarding-platform internal link", () => {
94+
expect(componentSource).toContain(
95+
"/solutions/employee-onboarding-platform",
96+
);
97+
});
98+
99+
it("mentions AI transcripts", () => {
100+
expect(componentSource.toLowerCase()).toContain("transcript");
101+
});
102+
});
103+
104+
describe("DeveloperDocumentationVideosPage FAQ schema", () => {
105+
const faqs = [
106+
{
107+
question: "What is a developer documentation video?",
108+
answer:
109+
"A developer documentation video is a screen recording that demonstrates how to use an API, SDK, CLI tool, or technical workflow.",
110+
},
111+
{
112+
question: "How do I embed a Cap video in my documentation?",
113+
answer:
114+
"Cap generates a shareable link the moment you stop recording. You can paste this URL directly into Notion, Confluence, Docusaurus, GitBook.",
115+
},
116+
{
117+
question: "Can I record my terminal and IDE output in 4K?",
118+
answer: "Yes. Cap records at up to 4K resolution at 60fps.",
119+
},
120+
{
121+
question: "Does Cap auto-generate transcripts for documentation?",
122+
answer:
123+
"Yes. Cap auto-generates captions and transcripts for every recording using AI transcription.",
124+
},
125+
{
126+
question: "How do I share a documentation video with my team or users?",
127+
answer:
128+
"Cap generates a shareable link immediately when you stop recording — no upload wait, no file attachment.",
129+
},
130+
{
131+
question: "Can I record videos for private internal documentation?",
132+
answer:
133+
"Yes. Cap supports password protection on individual recordings and expiry dates on share links.",
134+
},
135+
{
136+
question: "What is the best screen recorder for developer documentation?",
137+
answer:
138+
"Cap is the best screen recorder for developer documentation because it combines 4K recording quality, instant shareable links, AI-generated transcripts, and self-hosted storage.",
139+
},
140+
{
141+
question: "Does Cap work for recording API demos and SDK walkthroughs?",
142+
answer:
143+
"Yes. Cap is designed exactly for this use case. Record your terminal, IDE, browser, API client.",
144+
},
145+
];
146+
147+
it("produces valid FAQPage schema with 8 questions", () => {
148+
const schema = createFAQSchema(faqs);
149+
150+
expect(schema["@context"]).toBe("https://schema.org");
151+
expect(schema["@type"]).toBe("FAQPage");
152+
expect(schema.mainEntity).toHaveLength(8);
153+
});
154+
155+
it("maps each FAQ to a Question entity with acceptedAnswer", () => {
156+
const schema = createFAQSchema(faqs);
157+
158+
expect(schema.mainEntity[0]).toEqual({
159+
"@type": "Question",
160+
name: "What is a developer documentation video?",
161+
acceptedAnswer: {
162+
"@type": "Answer",
163+
text: faqs[0].answer,
164+
},
165+
});
166+
});
167+
168+
it("produces JSON-serializable output", () => {
169+
const schema = createFAQSchema(faqs);
170+
expect(() => JSON.stringify(schema)).not.toThrow();
171+
const parsed = JSON.parse(JSON.stringify(schema));
172+
expect(parsed["@type"]).toBe("FAQPage");
173+
expect(parsed.mainEntity).toHaveLength(8);
174+
});
175+
});
176+
177+
describe("DeveloperDocumentationVideosPage SEO registry", () => {
178+
it("is registered in seo-pages.ts", () => {
179+
const seoPagesSource = readFileSync(
180+
join(process.cwd(), "lib/seo-pages.ts"),
181+
"utf-8",
182+
);
183+
expect(seoPagesSource).toContain('"developer-documentation-videos"');
184+
});
185+
186+
it("is registered in seo-metadata.ts", () => {
187+
const seoMetadataSource = readFileSync(
188+
join(process.cwd(), "lib/seo-metadata.ts"),
189+
"utf-8",
190+
);
191+
expect(seoMetadataSource).toContain('"developer-documentation-videos"');
192+
});
193+
});
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
import type { Metadata } from "next";
2+
import Script from "next/script";
3+
import {
4+
DeveloperDocumentationVideosPage,
5+
developerDocumentationVideosContent,
6+
} from "@/components/pages/seo/DeveloperDocumentationVideosPage";
7+
import { createFAQSchema } from "@/utils/web-schema";
8+
9+
export const metadata: Metadata = {
10+
title:
11+
"Developer Documentation Videos — Record API Demos and SDK Walkthroughs | Cap",
12+
description:
13+
"Create professional developer documentation videos with screen recording. Record API demos, SDK walkthroughs, and technical tutorials instantly. Cap is free, open-source, 4K quality, and built for developers.",
14+
alternates: {
15+
canonical: "https://cap.so/developer-documentation-videos",
16+
},
17+
openGraph: {
18+
title:
19+
"Developer Documentation Videos — Record API Demos and SDK Walkthroughs | Cap",
20+
description:
21+
"Create professional developer documentation videos with screen recording. Record API demos, SDK walkthroughs, and technical tutorials instantly. Free, open-source, and built for developers.",
22+
url: "https://cap.so/developer-documentation-videos",
23+
siteName: "Cap",
24+
images: [
25+
{
26+
url: "https://cap.so/og.png",
27+
width: 1200,
28+
height: 630,
29+
alt: "Cap: Developer Documentation Videos",
30+
},
31+
],
32+
locale: "en_US",
33+
type: "website",
34+
},
35+
twitter: {
36+
card: "summary_large_image",
37+
title:
38+
"Developer Documentation Videos — Record API Demos and SDK Walkthroughs | Cap",
39+
description:
40+
"Record API demos, SDK walkthroughs, and changelog videos instantly. Share a link, embed in your docs, get AI transcripts. Free and open-source.",
41+
images: ["https://cap.so/og.png"],
42+
},
43+
};
44+
45+
export default function Page() {
46+
return (
47+
<>
48+
<Script
49+
id="faq-structured-data"
50+
type="application/ld+json"
51+
dangerouslySetInnerHTML={{
52+
__html: JSON.stringify(
53+
createFAQSchema(developerDocumentationVideosContent.faqs),
54+
),
55+
}}
56+
/>
57+
<DeveloperDocumentationVideosPage />
58+
</>
59+
);
60+
}

0 commit comments

Comments
 (0)