Skip to content

Commit 9326c3c

Browse files
committed
style(seo): apply prettier 2.8.8 to changed quickstart docs
The PR's editor (and the post-prettier action) had drifted from the repo's pinned prettier 2.8.8: trailing commas, JSX prop indentation inside MDX, and a few `<HowTo>` block layouts didn't match. CI's `prettier --check` over the changed file list was flagging 37 files; this commit runs `prettier --write` over the same list so the formatter check passes without rewriting any of the actual content. Signed-off-by: Neha Gupta <gneha21@yahoo.in>
1 parent 3caa69c commit 9326c3c

37 files changed

Lines changed: 1023 additions & 955 deletions

src/components/HowTo.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ export default function HowTo({
4848
// flags. If the author gave us nothing usable, drop the schema entirely
4949
// rather than ship a hollow HowTo.
5050
const validSteps = steps.filter(
51-
(s) => typeof s.name === "string" && s.name.trim() &&
52-
typeof s.text === "string" && s.text.trim(),
51+
(s) =>
52+
typeof s.name === "string" &&
53+
s.name.trim() &&
54+
typeof s.text === "string" &&
55+
s.text.trim()
5356
);
5457
if (validSteps.length === 0) {
5558
return null;
@@ -84,12 +87,12 @@ export default function HowTo({
8487
}
8588
if (Array.isArray(tools) && tools.length > 0) {
8689
schema.tool = tools.map((t) =>
87-
typeof t === "string" ? {"@type": "HowToTool", name: t} : t,
90+
typeof t === "string" ? {"@type": "HowToTool", name: t} : t
8891
);
8992
}
9093
if (Array.isArray(supplies) && supplies.length > 0) {
9194
schema.supply = supplies.map((s) =>
92-
typeof s === "string" ? {"@type": "HowToSupply", name: s} : s,
95+
typeof s === "string" ? {"@type": "HowToSupply", name: s} : s
9396
);
9497
}
9598

src/pages/about.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,24 @@ const aboutStructuredData = [
3535
"@context": "https://schema.org",
3636
"@type": "BreadcrumbList",
3737
itemListElement: [
38-
{"@type": "ListItem", position: 1, name: "Home", item: "https://keploy.io/"},
39-
{"@type": "ListItem", position: 2, name: "Docs", item: "https://keploy.io/docs/"},
40-
{"@type": "ListItem", position: 3, name: "About", item: "https://keploy.io/docs/about/"},
38+
{
39+
"@type": "ListItem",
40+
position: 1,
41+
name: "Home",
42+
item: "https://keploy.io/",
43+
},
44+
{
45+
"@type": "ListItem",
46+
position: 2,
47+
name: "Docs",
48+
item: "https://keploy.io/docs/",
49+
},
50+
{
51+
"@type": "ListItem",
52+
position: 3,
53+
name: "About",
54+
item: "https://keploy.io/docs/about/",
55+
},
4156
],
4257
},
4358
];

src/pages/concepts/reference/glossary.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ const glossaryStructuredData = [
3939
// Drop those entries here so structured data never carries a malformed
4040
// URL even if `glossaryEntries` has gaps.
4141
hasDefinedTerm: allGlossaryItems
42-
.filter((entry) => typeof entry.link === "string" && entry.link.length > 0)
42+
.filter(
43+
(entry) => typeof entry.link === "string" && entry.link.length > 0
44+
)
4345
.map((entry) => ({
4446
"@type": "DefinedTerm",
4547
name: entry.name,
@@ -54,7 +56,12 @@ const glossaryStructuredData = [
5456
itemListElement: [
5557
{"@type": "ListItem", position: 1, name: "Home", item: `${SITE}/`},
5658
{"@type": "ListItem", position: 2, name: "Docs", item: `${SITE}/docs/`},
57-
{"@type": "ListItem", position: 3, name: "Concepts", item: `${SITE}/docs/concepts/`},
59+
{
60+
"@type": "ListItem",
61+
position: 3,
62+
name: "Concepts",
63+
item: `${SITE}/docs/concepts/`,
64+
},
5865
{"@type": "ListItem", position: 4, name: "Glossary", item: GLOSSARY_URL},
5966
],
6067
},

src/pages/index.js

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@ import React from "react";
22
import Layout from "@theme/Layout";
33
import Head from "@docusaurus/Head";
44
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
5-
import {Community, KeployCloud, Resources, QuickStart, GetStartedPaths, TestingCapabilities, QuickStartTabs, WhatIsKeploy, EcosystemSupport} from "../components";
5+
import {
6+
Community,
7+
KeployCloud,
8+
Resources,
9+
QuickStart,
10+
GetStartedPaths,
11+
TestingCapabilities,
12+
QuickStartTabs,
13+
WhatIsKeploy,
14+
EcosystemSupport,
15+
} from "../components";
616
import {Products} from "../components/Product";
717
//import {Intro} from "../components";
818
export default function Home() {
@@ -47,29 +57,30 @@ export default function Home() {
4757
// The Article JSON-LD below derives its `headline`/`description` from these
4858
// same constants so the schema, the rendered <title>, the meta description
4959
// and the sr-only H1 all agree — single source of truth.
50-
const docsHomeTitle = "Keploy Documentation — Install, Capture & Replay API Tests";
51-
const docsHomeDescription = "Install Keploy in 5 minutes, capture real API traffic with eBPF, and replay it as deterministic tests in CI. Quickstarts, SDK references, and integration guides.";
52-
const articleSchema =
53-
docsUrl
54-
? {
55-
"@context": "https://schema.org",
56-
"@type": "Article",
57-
headline: docsHomeTitle,
58-
description: docsHomeDescription,
59-
mainEntityOfPage: {
60-
"@type": "WebPage",
61-
"@id": docsUrl,
62-
},
63-
publisher: {
64-
"@type": "Organization",
65-
name: "Keploy",
66-
logo: {
67-
"@type": "ImageObject",
68-
url: "https://keploy.io/docs/img/favicon.png",
69-
},
60+
const docsHomeTitle =
61+
"Keploy Documentation — Install, Capture & Replay API Tests";
62+
const docsHomeDescription =
63+
"Install Keploy in 5 minutes, capture real API traffic with eBPF, and replay it as deterministic tests in CI. Quickstarts, SDK references, and integration guides.";
64+
const articleSchema = docsUrl
65+
? {
66+
"@context": "https://schema.org",
67+
"@type": "Article",
68+
headline: docsHomeTitle,
69+
description: docsHomeDescription,
70+
mainEntityOfPage: {
71+
"@type": "WebPage",
72+
"@id": docsUrl,
73+
},
74+
publisher: {
75+
"@type": "Organization",
76+
name: "Keploy",
77+
logo: {
78+
"@type": "ImageObject",
79+
url: "https://keploy.io/docs/img/favicon.png",
7080
},
71-
}
72-
: null;
81+
},
82+
}
83+
: null;
7384

7485
return (
7586
<div className="main">

versioned_docs/version-4.0.0/quickstart/csharp-dotnet-postgres.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,37 +18,38 @@ keywords:
1818
- API Test generator
1919
- Auto Testcase generation
2020
---
21+
2122
import HowTo from '@site/src/components/HowTo';
2223

2324
<HowTo
24-
name="Sample CRUD App (CSharp) — record and replay tests with Keploy"
25-
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
26-
totalTime="PT10M"
27-
estimatedCost={{currency: "USD", value: "0"}}
28-
tools={["Keploy CLI", "Docker", "git"]}
29-
visible={false}
30-
steps={[
31-
{
32-
name: "Install Keploy",
33-
text: "Install the Keploy CLI on Linux/WSL using the install script from https://keploy.io/install.sh.",
34-
},
35-
{
36-
name: "Clone the sample app",
37-
text: "Clone the sample repo referenced on this page and install its dependencies.",
38-
},
39-
{
40-
name: "Start dependencies (database, etc.)",
41-
text: "Bring up any Docker services the app needs (databases, message queues) before recording.",
42-
},
43-
{
44-
name: "Record API calls",
45-
text: "Run keploy record -c \"CMD_TO_RUN_APP\" and exercise the app's endpoints (curl, Postman) to capture testcases and mocks.",
46-
},
47-
{
48-
name: "Replay tests",
49-
text: "Run keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay the recorded testcases and detect regressions.",
50-
},
51-
]}
25+
name="Sample CRUD App (CSharp) — record and replay tests with Keploy"
26+
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
27+
totalTime="PT10M"
28+
estimatedCost={{currency: "USD", value: "0"}}
29+
tools={["Keploy CLI", "Docker", "git"]}
30+
visible={false}
31+
steps={[
32+
{
33+
name: "Install Keploy",
34+
text: "Install the Keploy CLI on Linux/WSL using the install script from https://keploy.io/install.sh.",
35+
},
36+
{
37+
name: "Clone the sample app",
38+
text: "Clone the sample repo referenced on this page and install its dependencies.",
39+
},
40+
{
41+
name: "Start dependencies (database, etc.)",
42+
text: "Bring up any Docker services the app needs (databases, message queues) before recording.",
43+
},
44+
{
45+
name: "Record API calls",
46+
text: "Run keploy record -c \"CMD_TO_RUN_APP\" and exercise the app's endpoints (curl, Postman) to capture testcases and mocks.",
47+
},
48+
{
49+
name: "Replay tests",
50+
text: "Run keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay the recorded testcases and detect regressions.",
51+
},
52+
]}
5253
/>
5354

5455
## Running App Locally on Linux/WSL 🐧

versioned_docs/version-4.0.0/quickstart/express-postgresql-prisma.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,38 @@ keywords:
1717
- API Test generator
1818
- Auto Testcase generation
1919
---
20+
2021
import HowTo from '@site/src/components/HowTo';
2122

2223
<HowTo
23-
name="Express + PostgreSQL + Prisma Sample Application — record and replay tests with Keploy"
24-
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
25-
totalTime="PT10M"
26-
estimatedCost={{currency: "USD", value: "0"}}
27-
tools={["Keploy CLI", "Docker", "git"]}
28-
visible={false}
29-
steps={[
30-
{
31-
name: "Install Keploy",
32-
text: "Install the Keploy CLI on Linux/WSL using the install script from https://keploy.io/install.sh.",
33-
},
34-
{
35-
name: "Clone the sample app",
36-
text: "Clone the sample repo referenced on this page and install its dependencies.",
37-
},
38-
{
39-
name: "Start dependencies (database, etc.)",
40-
text: "Bring up any Docker services the app needs (databases, message queues) before recording.",
41-
},
42-
{
43-
name: "Record API calls",
44-
text: "Run keploy record -c \"CMD_TO_RUN_APP\" and exercise the app's endpoints (curl, Postman) to capture testcases and mocks.",
45-
},
46-
{
47-
name: "Replay tests",
48-
text: "Run keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay the recorded testcases and detect regressions.",
49-
},
50-
]}
24+
name="Express + PostgreSQL + Prisma Sample Application — record and replay tests with Keploy"
25+
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
26+
totalTime="PT10M"
27+
estimatedCost={{currency: "USD", value: "0"}}
28+
tools={["Keploy CLI", "Docker", "git"]}
29+
visible={false}
30+
steps={[
31+
{
32+
name: "Install Keploy",
33+
text: "Install the Keploy CLI on Linux/WSL using the install script from https://keploy.io/install.sh.",
34+
},
35+
{
36+
name: "Clone the sample app",
37+
text: "Clone the sample repo referenced on this page and install its dependencies.",
38+
},
39+
{
40+
name: "Start dependencies (database, etc.)",
41+
text: "Bring up any Docker services the app needs (databases, message queues) before recording.",
42+
},
43+
{
44+
name: "Record API calls",
45+
text: "Run keploy record -c \"CMD_TO_RUN_APP\" and exercise the app's endpoints (curl, Postman) to capture testcases and mocks.",
46+
},
47+
{
48+
name: "Replay tests",
49+
text: "Run keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay the recorded testcases and detect regressions.",
50+
},
51+
]}
5152
/>
5253

5354
import InstallReminder from '@site/src/components/InstallReminder';

versioned_docs/version-4.0.0/quickstart/flask-redis.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,37 +20,38 @@ keywords:
2020
- API Test generator
2121
- Auto case generation
2222
---
23+
2324
import HowTo from '@site/src/components/HowTo';
2425

2526
<HowTo
26-
name="Sample Library App (Flask + Redis) — record and replay tests with Keploy"
27-
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
28-
totalTime="PT10M"
29-
estimatedCost={{currency: "USD", value: "0"}}
30-
tools={["Keploy CLI", "Docker", "git"]}
31-
visible={false}
32-
steps={[
33-
{
34-
name: "Install Keploy",
35-
text: "Install the Keploy CLI on Linux/WSL using the install script from https://keploy.io/install.sh.",
36-
},
37-
{
38-
name: "Clone the sample app",
39-
text: "Clone the sample repo referenced on this page and install its dependencies.",
40-
},
41-
{
42-
name: "Start dependencies (database, etc.)",
43-
text: "Bring up any Docker services the app needs (databases, message queues) before recording.",
44-
},
45-
{
46-
name: "Record API calls",
47-
text: "Run keploy record -c \"CMD_TO_RUN_APP\" and exercise the app's endpoints (curl, Postman) to capture testcases and mocks.",
48-
},
49-
{
50-
name: "Replay tests",
51-
text: "Run keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay the recorded testcases and detect regressions.",
52-
},
53-
]}
27+
name="Sample Library App (Flask + Redis) — record and replay tests with Keploy"
28+
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
29+
totalTime="PT10M"
30+
estimatedCost={{currency: "USD", value: "0"}}
31+
tools={["Keploy CLI", "Docker", "git"]}
32+
visible={false}
33+
steps={[
34+
{
35+
name: "Install Keploy",
36+
text: "Install the Keploy CLI on Linux/WSL using the install script from https://keploy.io/install.sh.",
37+
},
38+
{
39+
name: "Clone the sample app",
40+
text: "Clone the sample repo referenced on this page and install its dependencies.",
41+
},
42+
{
43+
name: "Start dependencies (database, etc.)",
44+
text: "Bring up any Docker services the app needs (databases, message queues) before recording.",
45+
},
46+
{
47+
name: "Record API calls",
48+
text: "Run keploy record -c \"CMD_TO_RUN_APP\" and exercise the app's endpoints (curl, Postman) to capture testcases and mocks.",
49+
},
50+
{
51+
name: "Replay tests",
52+
text: "Run keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay the recorded testcases and detect regressions.",
53+
},
54+
]}
5455
/>
5556

5657
import ProductTier from '@site/src/components/ProductTier';

0 commit comments

Comments
 (0)