Skip to content

feat(docs): site health + AI-citation fixes (A1, A2, A8 …) - #897

Open
dhananjay6561 wants to merge 11 commits into
keploy:mainfrom
dhananjay6561:feat/ai-citation-health
Open

feat(docs): site health + AI-citation fixes (A1, A2, A8 …)#897
dhananjay6561 wants to merge 11 commits into
keploy:mainfrom
dhananjay6561:feat/ai-citation-health

Conversation

@dhananjay6561

@dhananjay6561 dhananjay6561 commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

Site Health + AI-citation / GEO fixes for the docs site, from the Aug 2026 SEMrush audit (Site Health 84%, AI Search Health 84%) and the schema-type audit. Covers the docs tickets A1–A10 / AI1–AI6 plus the structured-data specialization from the schema audit, prioritising template-level fixes that clear hundreds of pages at once.

Scope: docs repo only. Off main, independent of the Core Web Vitals PR (#896). All work verified against the served version (v4.0.0) on current main.


📊 Ticket status

ID Area What Status
A1 / AI1 SEO AI image added to Article schema — fixes ~146 "invalid structured data" ✅ Done
A2 SEO <title> differentiated from on-page <h1> — fixes 124 duplicates ✅ Done
A7 SEO Unique meta descriptions (6 pages that existed of the 11) ✅ Done
A8 (alt) A11Y AI Descriptive alt on 13 images / 8 pages ✅ Done
Schema: specialize SEO AI Generic Article343 TechArticle + 35 APIReference ✅ Done
Schema: bespoke pages SEO AI /leadership (CollectionPage+ItemList+Person), /security (WebPage+ContactPoint), /privacy-policy (DigitalDocument) ✅ Done
AI4: FAQPage AI FAQPage JSON-LD (Question/Answer) on the 3 FAQ docs (14/11/12 Q&A) ✅ Done
A3 / AI2 A11Y AI icon-link aria-labels ✅ Already satisfied in theme
Schema: @graph SEO Consolidate fragmented Organization/WebSite nodes under @id ⏳ In progress
Schema: DefinedTerm SEO AI DefinedTerm on glossary term pages ⏳ In progress
Schema: net-new SEO AI VideoObject / ItemList / Course / Event / Offer / wider HowTo ⏳ In progress
A9 SEO Small cleanup (titles, sitemap, 403 links, anchors) ⏳ Planned
A4 / AI5 SEO AI Cross-linking pages with a single internal link (157) ⏳ Planned (content)
A5 / AI3 SEO AI Expand thin glossary + filter pages ⏳ Planned (content)
A6 PERF brotli/gzip — Vercel host setting, not source ⏳ Ops follow-up
A10 SEO Verify legacy /docs/1.0.0/* block is intentional ⏳ Verify-only

✅ Changes so far

Structured data — schema specialization (schema audit)

  • Every doc page emitted a generic Article. DocItem now routes API-reference pages (api-testing-*, public-api, cli-commands, sdk-installation — by tag or path) to APIReference and defaults all other docs to TechArticle. Both are Article subtypes accepting the same properties, so the schema shape is unchanged — just a precise, AI/Google-friendly type. Built HTML: 35 APIReference, 343 TechArticle, 0 generic Article from docs.
  • A1 · image on Article schemaDocItem computed socialImage but never put it in the JSON-LD, so ~146 pages were "invalid structured data" (missing image). Now included, with the site-wide 1200×630 og:image as the fallback.

Structured data — new emitters

  • Bespoke pages (/leadership, /security, /privacy-policy) emitted zero page-level schema. Added JSON-LD: CollectionPage + ItemList of Person (leadership team, with photo + Twitter + worksFor), WebPage + security ContactPoint (responsible-disclosure email), and DigitalDocument with dateModified (privacy policy).
  • FAQPage (AI4) — new dependency-free remark plugin (src/remark/remarkFaqSchema.js) extracts each ### question + answer prose from the FAQ docs into Question/acceptedAnswer pairs and injects FAQPage JSON-LD. Built HTML: valid FAQPage with 14 / 11 / 12 Q&A on the three FAQ pages.

SEO / metadata

  • A2 · title ≠ h1DocItem set <title>{title}</title> (identical to the h1) on 124 pages; now suffixed | Keploy Docs.
  • A7 · unique meta descriptions — 4 glossary/general pages shared one boilerplate description, share-tests copied the generate-api-tests one, and k8s-proxy had a wrong (NextJS/Drizzle) description; each now has a unique, accurate one.

Accessibility / AI

  • A8 · alt text — added descriptive alt to 13 images across 8 pages (glossary GIFs + running-keploy screenshots).

🧭 Notes / deviations from the plan

  • A3 already satisfied — footer socials, heading hash-links (Heading/index.js), and the breadcrumb home link already carry aria-labels; the residual SEMrush "no anchor text" is the zero-width-space hash-link icons, which already have the correct accessible name.
  • Review/rating schema: out of scopeAggregateRating/Review for one's own product violates Google's structured-data policy (manual-action risk). Real ratings stay surfaced via the Organization sameAs links (G2/Gartner/Capterra). (Same call as CWV perf(docs): core web vitals — self-host fonts, drop dead assets, defer pixel, add security headers #896.)
  • Double-h1 (A8 first half): skipped by request. 4 of the 5 audit-named files no longer exist on main anyway.
  • A4 / A5 (content): cross-linking 157 pages and rewriting thin content are done in meaningful, hand-authored batches (not machine-sprayed) to avoid spammy output.
  • A6 is a Vercel/CDN host setting, not a source change — flagged for ops.

✅ Verification

  • npm run build succeeds (onBrokenLinks: throw); all changed files pass prettier 3.9.6 (the version CI's action actually runs, despite the 2.8.8 pin).
  • Structured data verified in built HTML: @type distribution (TechArticle/APIReference), bespoke-page schema present, FAQPage JSON-LD decodes to valid FAQPage with all Q&A.
  • Validate a doc page + a FAQ page in the Rich Results Test.

DocItem computed socialImage but never included it in the Article/
TechArticle JSON-LD, so every doc page emitted an Article without the
required 'image' field -> ~146 pages flagged invalid structured data.

Add image to articleSchema, falling back to the site-wide default social
card (the same 1200x630 og:image from docusaurus.config.js) when a doc
sets no front-matter image.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
The swizzled DocItem set <title>{title}</title>, identical to the on-page
<h1> (also the doc title) -> SEMrush 'Duplicate content in h1 and title'
on 124 pages. Append ' | Keploy Docs' so the title differs from the h1.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Copilot AI lite review requested due to automatic review settings August 7, 2026 10:00
13 images across 8 doc pages (glossary GIFs + running-keploy screenshots)
had no alt attribute -> SEMrush 'Missing ALT' + weaker AI/accessibility
extraction. Add descriptive alt to each. utg-vscode-extension from the
audit list no longer exists on main, so it is not included.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Pre-existing whitespace/list-indent/final-newline issues in these two
files (unrelated to the alt fix) would fail the prettier CI check once the
files are touched. Apply prettier so the PR is clean.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Docusaurus DocItem theme component to address SEO / AI-citation audit findings by improving structured data completeness and avoiding duplicate <title>/<h1> signals across docs pages.

Changes:

  • Adds an image field to the per-page Article/TechArticle JSON-LD (with a fallback when front matter has no image).
  • Appends a suffix to <title> to differentiate it from the on-page <h1>.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/theme/DocItem/index.js Outdated
Comment thread src/theme/DocItem/index.js
Wrap the long articleImage fallback line and flatten the pre-existing
nested-ternary indentation so the swizzled DocItem is clean under the
CI-pinned prettier 2.8.8 (--check runs on changed files).

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
The prettify_code workflow pins prettier_version 2.8.8, but creyD/
prettier_action's npx step actually installs and runs prettier 3.9.6.
3.x changed nested-ternary indentation, so the prior 2.8.8-flattened
schemaType ternary failed CI. Reformat to 3.9.6 (the version CI runs) so
--check passes; all other changed files are already 3.9.6-clean.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Every /docs page emitted a generic Article. Route API-reference pages
(api-testing-*, public-api, cli-commands, sdk-installation — by tag or
path) to APIReference, and default all other docs to TechArticle. Both are
Article subtypes accepting the same properties as articleSchema, so the
schema shape is unchanged — just a precise, AI/Google-friendly type.
Built HTML: 35 APIReference, 343 TechArticle, 0 generic Article from docs.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
general-glossary + 3 glossary terms shared one boilerplate description;
share-tests copied the generate-api-tests description; k8s-proxy had a
wrong (NextJS/Drizzle) description. Give each a unique, accurate one to
clear SEMrush 'Duplicate meta descriptions'.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Pre-existing leading-space paragraphs (unrelated to the description
change) would fail the prettier CI check once the file is touched.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
/leadership, /security and /privacy-policy emitted zero page-level schema.
Add JSON-LD: leadership -> CollectionPage + ItemList of Person (name,
photo, Twitter, worksFor Keploy); security -> WebPage + security
ContactPoint (responsible-disclosure email); privacy-policy ->
DigitalDocument with dateModified. Verified in built HTML.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
@dhananjay6561 dhananjay6561 self-assigned this Aug 7, 2026
New dependency-free remark plugin extracts each ### question + following
answer prose from FAQ docs (keploy-explained/*-faq) and injects FAQPage
JSON-LD with Question/acceptedAnswer pairs, so they're eligible for FAQ
rich results and AI extraction. Built HTML: FAQPage with 14/11/12 Q&A on
the three FAQ pages.

Signed-off-by: dhananjay6561 <dhananjayaggarwal6561@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants