Commit d904631
seo: HowTo schema, glossary DefinedTermSet, docs landing fixes (#857)
* docs(seo): add HowTo schema, glossary DefinedTermSet, docs landing fixes
Audit findings on keploy.io/docs and follow-up coverage.
Critical fixes:
- /docs/ landing was rendering zero H1, with title "Keploy Documentation"
(20 chars) and description "API Test Generator Tool" (23 chars). Both too
short to capture docs intent (install, capture, replay, SDK). Added an
sr-only H1 plus a longer Layout title/description on src/pages/index.js
("Keploy Documentation — Install, Capture & Replay API Tests" + a 159-char
description covering install, capture, CI replay, SDK references).
- src/pages/about.js shipped zero JSON-LD because src/pages/* are not covered
by the docs schema plugin. Inlined Article + BreadcrumbList JSON-LD via
@docusaurus/Head.
- src/pages/concepts/reference/glossary.js shipped zero JSON-LD too. Now
emits a single DefinedTermSet from the entire glossaryEntries data, with
one DefinedTerm per glossary entry. Mirrors the pattern in landing's
/what-is-api-testing layout.
- Docusaurus sitemap noIndex on 1.0.0 / 2.0.0 archives + ignorePatterns to
drop /tags/** and /1.0.0/** /2.0.0/** from the generated sitemap. Reduces
crawl-budget dilution; preserves the recently-added priority bucket
comments above the sitemap config.
HowTo schema rollout:
- New src/components/HowTo.js wrapper. API:
<HowTo
name="Install Keploy on Linux"
totalTime="PT5M"
tools={[...]} supplies={[...]}
steps={[{name, text, url}, ...]}
visible={true|false}
/>
Emits valid HowTo JSON-LD via @docusaurus/Head and (when visible) renders
a numbered <ol>. Use visible={false} on pages that already render the
steps in prose to avoid duplicate UI.
- Applied to versioned_docs/version-4.0.0/server/installation.md (visible
HowTo above the existing prose).
- Applied to all 32 quickstart pages in versioned_docs/version-4.0.0/quickstart
with visible={false} (existing tutorial prose remains; only schema is added).
SDK-installation title alignment:
- /docs/server/sdk-installation/go|python|javascript pages had H1/title
"Merge Test Coverage Data" while the URL says "sdk-installation". Title
rewritten to "Keploy [Language] SDK — Install & Merge Test Coverage" so
URL and content topic align without renaming the route or moving files.
java.md is unchanged here — upstream main has rewritten that file as
the Enterprise dynamic-deduplication agent guide, so the SDK-install
framing no longer applies to it.
Built + verified: `npx docusaurus build` produces a clean static build.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* docs(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.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* docs(seo): address remaining PR #857 review comments
- src/components/HowTo.js: when `visible={true}`, the rendered <ol>
no longer derives <li id> from `s.url` alone (multiple steps can
share the same anchor and that produced duplicate ids in the DOM).
The id now suffixes the step position — `${slug}-step-${i+1}`.
- versioned_docs/version-4.0.0/server/sdk-installation/python.md:
meta description rephrased — was a sentence fragment ending
"Combined reports seamlessly.", now a complete clause that reads
cleanly in SERP snippets.
- versioned_docs/version-4.0.0/server/sdk-installation/javascript.md:
same fix for the "Combined integration + unit-test reports."
fragment.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* docs(seo): drop HowTo li id, fix glossary typo + guard JSON-LD URLs
- src/components/HowTo.js: stop deriving the visible <li> `id`
from `s.url`. In docs usage step.url often points at an existing
heading anchor on the page (e.g. `#capturing-testcases`), so the
list-item id would clash with the h2 anchor whenever `visible`
is enabled. The list is just the readable view; `step.url` in
the JSON-LD already carries the schema linkage.
- static/data/glossaryEntries.js: fix the "Stubs" entry which had
`ink:` instead of `link:`.
- src/pages/concepts/reference/glossary.js: defensively filter
glossary entries missing a valid `link` before mapping into
DefinedTerm.url, so a future similar gap can't ship a malformed
`https://keploy.ioundefined` URL into the JSON-LD.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* fix(seo): drop wrong HowTo step anchor, rephrase Go SDK description
The first install-Linux HowTo step ("Download and install the Keploy
binary") was pointing at #capturing-testcases — that anchor exists on
the page but it's the wrong section for the install command. There's no
installation-specific anchor to point to (the install runs inline above
the H2s), so drop the url field for that step rather than emit a
misleading deep link.
Go SDK meta description was a noun phrase tail of "Graceful shutdown
setup, -cover flag, combined reports." Rephrase as a complete sentence
so AI engines and snippet renderers can quote it cleanly.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* fix(seo): prefix sitemap ignorePatterns with /docs/, validate HowTo steps
baseUrl is /docs/, so Docusaurus emits sitemap routes as /docs/tags/...
and /docs/1.0.0/.../docs/2.0.0/... . The previous bare patterns
(/tags/**, /1.0.0/**, /2.0.0/**) couldn't match those, so tag indexes
and the legacy doc versions were quietly slipping into the generated
sitemap despite the noIndex headers elsewhere. Add the prefixed
patterns; keep the bare ones as defence-in-depth in case baseUrl is
ever flattened.
HowTo.js was emitting steps with empty `text` and auto-generated "Step N"
names whenever authors omitted those fields, producing low-quality
HowTo structured data the rich-results test flags. Filter to entries
that carry both `name` and `text`; drop the schema entirely if none
qualify, and render the visible <ol> from the same filtered list so the
markup and JSON-LD stay in sync.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* 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>
* chore(vale): skip <HowTo> MDX blocks when linting prose
Vale was treating JSX prop values inside <HowTo> blocks as narrative
prose and flagging Google.Quotes (commas inside `"Keploy CLI", "Docker"`
arrays), Google.EmDash (the " — " separators in display names), and
Vale.Spelling on identifier-like step text. None of those are prose;
they're structured component data. Add BlockIgnores patterns covering
both self-closing and paired forms so the linter stays focused on the
actual tutorial copy.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* chore(vale): match <HowTo> across newlines and `>` inside JSX values
The previous BlockIgnores pattern `[^>]*?` stopped on the first `>`,
which appears inside JSX prop values like `Linux kernel >= 5.10` and
inside the `=>` arrow callbacks generated by prettier. As a result the
ignore never spanned the full HowTo element and Vale was still linting
its body. Switch to `[\s\S]*?` (any char, lazy) so the regex spans
multiple lines and tolerates literal `>` characters in prop values.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* chore(vale): accept "Sanic" — Python web framework name
Vale was flagging "Sanic" in the Sanic-MongoDB quickstart's
introduction prose as a misspelling. It's the proper noun of the
Python framework the sample app is built on. Add to the accept vocab.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* fix(seo): align about-page metadata, JSON-LD, and visible H1
src/pages/about.js was shipping three different copies of the page's
title and description: Layout `title`/`description` ("About the docs"
/ "User General Information about Keploy's Documentation"), the
Article JSON-LD `headline`/`description` ("About the Keploy
Documentation" / "Information about Keploy's documentation,
contribution guidelines, and licensing."), and the visible H1 ("About
the docs"). Snippet generators and rich-result renderers see a mismatch
between the rendered meta tags and the structured data, which confuses
the title they pick for SERP displays.
Hoist the title and description into ABOUT_TITLE / ABOUT_DESCRIPTION
constants and feed them into all three sites: Layout props, Article
JSON-LD, and the visible H1. One source of truth.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* fix(seo): drop unused imports flagged by Copilot on /docs landing
src/pages/about.js previously imported useDocusaurusContext but the
ABOUT_TITLE/ABOUT_DESCRIPTION refactor removed every read of context /
siteConfig. The hook call was sitting dead in the component body. Drop
both the call and the import.
src/pages/index.js was importing KeployCloud, Resources, QuickStart, and
Products (the latter via the separate Product subpath import) only to
reference them in commented-out JSX. Strip the dead imports — the
commented JSX stays put so the references are still discoverable when
those sections are re-enabled.
No behaviour change. Quiets ESLint no-unused-vars on these files and
keeps the bundle from pulling those component modules into the docs
landing chunk.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* fix(seo): correct k8s-proxy HowTo, express casing, about.js URL source
Addresses @amaan-bhati's pre-merge review on #857.
1. k8s-proxy.md HowTo described the wrong workflow. The page is the
Kubernetes live record/replay guide (Kind + kubectl + Helm + the
Keploy Dashboard proxy), but the schema steps walked through the
standard CLI flow (`keploy record -c "CMD_TO_RUN_APP"`), which does
not apply here. Google would have ingested factually wrong HowTo
structured data for this URL. Rewrote name/description/tools/steps to
the real flow: install prereqs + clone, create Kind cluster, build &
load images, kubectl apply + port-forward, connect cluster in the
dashboard, install the proxy via Helm, start recording, generate
tests with AI. Dropped "Keploy CLI" from tools (this page uses the
proxy, not the CLI); kept visible={false} since the prose renders the
tutorial.
2. samples-express-mongoose.md HowTo name used Title Case for the
"— Record and Replay Tests with Keploy" suffix while all 30+ other
quickstarts use lowercase "— record and replay tests with Keploy".
Lowercased the suffix to match; kept "API" / "Express" capitalized
(the earlier Copilot ask).
3. about.js hardcoded `https://keploy.io/docs/...` in the Article url,
@id, logo, and every breadcrumb item. Refactored to a single SITE
constant + derived path constants, mirroring glossary.js, so the
structured data tracks the domain/baseUrl in one place instead of
going stale field-by-field.
Verified with `docusaurus build` (Generated static files, no errors)
and prettier 2.5.1.
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
---------
Signed-off-by: Neha Gupta <gneha21@yahoo.in>
Co-authored-by: Neha Gupta <gneha21@yahoo.in>1 parent f475fd0 commit d904631
44 files changed
Lines changed: 1483 additions & 43 deletions
File tree
- src
- components
- pages
- concepts/reference
- static/data
- vale_styles/config/vocabularies/Base
- versioned_docs/version-4.0.0
- quickstart
- server
- sdk-installation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
11 | 23 | | |
12 | 24 | | |
13 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
371 | 372 | | |
372 | 373 | | |
| 374 | + | |
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
| |||
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
467 | 490 | | |
468 | 491 | | |
469 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
5 | 84 | | |
6 | 85 | | |
7 | | - | |
8 | | - | |
9 | 86 | | |
10 | 87 | | |
11 | | - | |
| 88 | + | |
12 | 89 | | |
13 | | - | |
| 90 | + | |
14 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
15 | 99 | | |
16 | | - | |
| 100 | + | |
17 | 101 | | |
18 | 102 | | |
19 | 103 | | |
| |||
0 commit comments