Skip to content

Commit d0dc23f

Browse files
committed
seo: address PR #857 review comments
- versioned_docs/version-4.0.0/server/installation.md: add explicit {#capturing-testcases} / {#running-testcases} anchors on the H2s and update HowTo step.url to those anchors. The previous `#-capturing-testcases` slug relied on Docusaurus's auto-slugger behavior with leading emojis and was fragile. - versioned_docs/version-4.0.0/quickstart/k8s-proxy.md: HowTo `tools` list now includes Kind, kubectl, Helm — the prerequisites the page itself calls out below the schema. - versioned_docs/version-4.0.0/quickstart/samples-express-mongoose.md: HowTo `name` is now title-cased ("Sample Course-Selling API (Express) — Record and Replay Tests with Keploy") instead of all lowercase. - versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md: fix typo "Intoduction" → "Introduction". - src/pages/about.js: drop unused `useBaseUrl` import. JSON-LD URLs now carry trailing slashes to match Docusaurus `trailingSlash: true` config — both the Article `url`/`@id` and the BreadcrumbList `item`s. - src/pages/concepts/reference/glossary.js: same trailing-slash fix for DefinedTermSet `@id`/`url`, per-term DefinedTerm `url`s, and the BreadcrumbList items. Centralized via a `withTrailingSlash` helper so future glossary entries inherit the canonical form. - src/pages/index.js: Article schema's `headline` and `description` now derive from `docsHomeTitle` / `docsHomeDescription` (the same values used for the rendered <title>, meta description, and sr-only H1) instead of the old short `siteConfig.title` / `siteConfig.tagline`. Schema and on-page metadata now agree.
1 parent e6f719f commit d0dc23f

7 files changed

Lines changed: 48 additions & 30 deletions

File tree

src/pages/about.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ import React from "react";
22
import Layout from "@theme/Layout";
33
import Head from "@docusaurus/Head";
44
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
5-
import useBaseUrl from "@docusaurus/useBaseUrl";
65

76
// Custom React pages under src/pages/ are not covered by the docs schema
87
// plugin — add Article + BreadcrumbList JSON-LD inline so the page is
98
// machine-readable for search engines and AI crawlers.
9+
//
10+
// Site config sets `trailingSlash: true`, so canonical URLs in the JSON-LD
11+
// must carry the trailing slash to match the actual emitted href and avoid
12+
// duplicate URL variants in structured data.
1013
const aboutStructuredData = [
1114
{
1215
"@context": "https://schema.org",
1316
"@type": "Article",
1417
headline: "About the Keploy Documentation",
1518
description:
1619
"Information about Keploy's documentation, contribution guidelines, and licensing.",
17-
url: "https://keploy.io/docs/about",
20+
url: "https://keploy.io/docs/about/",
1821
publisher: {
1922
"@type": "Organization",
2023
name: "Keploy",
@@ -25,16 +28,16 @@ const aboutStructuredData = [
2528
},
2629
mainEntityOfPage: {
2730
"@type": "WebPage",
28-
"@id": "https://keploy.io/docs/about",
31+
"@id": "https://keploy.io/docs/about/",
2932
},
3033
},
3134
{
3235
"@context": "https://schema.org",
3336
"@type": "BreadcrumbList",
3437
itemListElement: [
35-
{"@type": "ListItem", position: 1, name: "Home", item: "https://keploy.io"},
36-
{"@type": "ListItem", position: 2, name: "Docs", item: "https://keploy.io/docs"},
37-
{"@type": "ListItem", position: 3, name: "About", item: "https://keploy.io/docs/about"},
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/"},
3841
],
3942
},
4043
];

src/pages/concepts/reference/glossary.js

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,46 @@ import GlossaryCard from "../../../components/GlossaryCard";
1010
// DefinedTermSet so AI engines can cite individual definitions and engines
1111
// can surface them as featured-snippet definitions. Mirrors the pattern in
1212
// landing/app/(default)/what-is-api-testing/layout.tsx.
13+
//
14+
// Site config sets `trailingSlash: true`, so every emitted URL must carry a
15+
// trailing slash to match the canonical href. Otherwise Google treats the
16+
// no-slash variant as a duplicate URL of the canonical one.
1317
const allGlossaryItems = Object.values(glossaryEntries).flat();
1418
const SITE = "https://keploy.io";
19+
const GLOSSARY_PATH = "/docs/concepts/reference/glossary/";
20+
const GLOSSARY_URL = `${SITE}${GLOSSARY_PATH}`;
21+
const TERMSET_ID = `${GLOSSARY_URL}#termset`;
22+
23+
function withTrailingSlash(path) {
24+
if (!path) return path;
25+
return path.endsWith("/") ? path : `${path}/`;
26+
}
1527

1628
const glossaryStructuredData = [
1729
{
1830
"@context": "https://schema.org",
1931
"@type": "DefinedTermSet",
20-
"@id": `${SITE}/docs/concepts/reference/glossary#termset`,
32+
"@id": TERMSET_ID,
2133
name: "Keploy Software Testing Glossary",
2234
description:
2335
"Definitions for software testing, test automation, and quality engineering terminology, maintained by the Keploy documentation team.",
24-
url: `${SITE}/docs/concepts/reference/glossary`,
36+
url: GLOSSARY_URL,
2537
hasDefinedTerm: allGlossaryItems.map((entry) => ({
2638
"@type": "DefinedTerm",
2739
name: entry.name,
2840
description: entry.description,
29-
url: `${SITE}${entry.link}`,
30-
inDefinedTermSet: `${SITE}/docs/concepts/reference/glossary#termset`,
41+
url: `${SITE}${withTrailingSlash(entry.link)}`,
42+
inDefinedTermSet: TERMSET_ID,
3143
})),
3244
},
3345
{
3446
"@context": "https://schema.org",
3547
"@type": "BreadcrumbList",
3648
itemListElement: [
37-
{"@type": "ListItem", position: 1, name: "Home", item: SITE},
38-
{"@type": "ListItem", position: 2, name: "Docs", item: `${SITE}/docs`},
39-
{"@type": "ListItem", position: 3, name: "Concepts", item: `${SITE}/docs/concepts`},
40-
{"@type": "ListItem", position: 4, name: "Glossary", item: `${SITE}/docs/concepts/reference/glossary`},
49+
{"@type": "ListItem", position: 1, name: "Home", item: `${SITE}/`},
50+
{"@type": "ListItem", position: 2, name: "Docs", item: `${SITE}/docs/`},
51+
{"@type": "ListItem", position: 3, name: "Concepts", item: `${SITE}/docs/concepts/`},
52+
{"@type": "ListItem", position: 4, name: "Glossary", item: GLOSSARY_URL},
4153
],
4254
},
4355
];

src/pages/index.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,21 @@ export default function Home() {
4141
],
4242
}
4343
: null;
44+
// SEO: docs landing previously rendered with title "Keploy Documentation" (20c)
45+
// and meta description "API Test Generator Tool" (23c). Both were too short
46+
// to capture the intent of a docs visitor (install, capture, replay, SDK).
47+
// The Article JSON-LD below derives its `headline`/`description` from these
48+
// same constants so the schema, the rendered <title>, the meta description
49+
// 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.";
4452
const articleSchema =
45-
docsUrl && siteConfig.title
53+
docsUrl
4654
? {
4755
"@context": "https://schema.org",
4856
"@type": "Article",
49-
headline: siteConfig.title,
50-
description: siteConfig.tagline,
57+
headline: docsHomeTitle,
58+
description: docsHomeDescription,
5159
mainEntityOfPage: {
5260
"@type": "WebPage",
5361
"@id": docsUrl,
@@ -62,11 +70,6 @@ export default function Home() {
6270
},
6371
}
6472
: null;
65-
// SEO: docs landing previously rendered with title "Keploy Documentation" (20c)
66-
// and meta description "API Test Generator Tool" (23c). Both were too short
67-
// to capture the intent of a docs visitor (install, capture, replay, SDK).
68-
const docsHomeTitle = "Keploy Documentation — Install, Capture & Replay API Tests";
69-
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.";
7073

7174
return (
7275
<div className="main">

versioned_docs/version-4.0.0/quickstart/k8s-proxy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import HowTo from '@site/src/components/HowTo';
1919
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
2020
totalTime="PT10M"
2121
estimatedCost={{currency: "USD", value: "0"}}
22-
tools={["Keploy CLI", "Docker", "git"]}
22+
tools={["Keploy CLI", "Docker", "git", "Kind", "kubectl", "Helm"]}
2323
visible={false}
2424
steps={[
2525
{

versioned_docs/version-4.0.0/quickstart/samples-express-mongoose.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ keywords:
1919
import HowTo from '@site/src/components/HowTo';
2020

2121
<HowTo
22-
name="sample course selling api (express) — record and replay tests with Keploy"
22+
name="Sample Course-Selling API (Express) — Record and Replay Tests with Keploy"
2323
description="Clone the sample app, run it under Keploy to capture API traffic, then replay the recorded testcases."
2424
totalTime="PT10M"
2525
estimatedCost={{currency: "USD", value: "0"}}

versioned_docs/version-4.0.0/quickstart/samples-node-mongo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import HowTo from '@site/src/components/HowTo';
5454
]}
5555
/>
5656

57-
## Intoduction 📌
57+
## Introduction 📌
5858

5959
A sample **_CRUD_** application to see how Keploy integrates effortlessly with **_Express.js_** and **_MongoDB_**. Get ready to see the power of Keploy 🔅🔅.
6060

versioned_docs/version-4.0.0/server/installation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import InstallationGuide from '../concepts/installation.md'
4040
{
4141
name: "Download and install the Keploy binary",
4242
text: "Run: curl --silent -O -L https://keploy.io/install.sh && source install.sh",
43-
url: "#-capturing-testcases",
43+
url: "#capturing-testcases",
4444
},
4545
{
4646
name: "Verify the installation",
@@ -49,19 +49,19 @@ import InstallationGuide from '../concepts/installation.md'
4949
{
5050
name: "Record API calls for your app",
5151
text: "Run: keploy record -c \"CMD_TO_RUN_APP\" (for example, keploy record -c \"go run main.go\").",
52-
url: "#-capturing-testcases",
52+
url: "#capturing-testcases",
5353
},
5454
{
5555
name: "Replay the recorded tests",
5656
text: "Run: keploy test -c \"CMD_TO_RUN_APP\" --delay 10 to replay testcases and detect regressions.",
57-
url: "#-running-testcases",
57+
url: "#running-testcases",
5858
},
5959
]}
6060
/>
6161

6262
<InstallationGuide/>
6363

64-
## 🎬 Capturing Testcases
64+
## 🎬 Capturing Testcases {#capturing-testcases}
6565

6666
To initiate the recording of API calls, execute this command in your terminal:
6767

@@ -75,7 +75,7 @@ For example, if you're using a simple Golang program, the **CMD_TO_RUN_APP** wou
7575
keploy record -c "go run main.go"
7676
```
7777

78-
## 🏃 Running Testcases
78+
## 🏃 Running Testcases {#running-testcases}
7979

8080
To run the testcases and see if there are any regressions introduced, use this terminal command:
8181

0 commit comments

Comments
 (0)