Repository navigation
Docs breadcrumbs: drop the URL-less section step, and check JSON-LD - #531
Merged
Merged
Conversation
Search Console flagged every docs page: Missing field "item" (in "itemListElement"). The breadcrumb was Docs > <sidebar group> > <page>, and sidebar groups have no page, so the middle step had no item URL, which Google requires. Now Docs > <page>, and the docs index is a single step rather than the same URL twice. site/scripts/structured-data.mjs parses every built page's JSON-LD and checks each BreadcrumbList (positions, names, an item URL on every step, no repeated URLs). Run in the Site workflow after the build. Against the previous Head.astro it reports 12 problems, one per docs page.
Contributor
|
Site preview: https://pr-531.netscli-site-preview.pages.dev Built from ae1e373 with Production is unaffected: netscli.com is served from GitHub Pages via |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Search Console's critical issue Missing field "item" (in "itemListElement") on the docs pages.
Cause.
Head.astroemitted Docs > sidebar group > page. Sidebar groups (Start, Interfaces, Operations, Reference) have no page, so the middle step had a name and noitemURL. Google requires one on every step but the last. Live on netscli.com/docs/install/ today:Fix. Docs > page. The docs index gets one step (it is Docs) instead of the same URL twice.
Guard. New
check:structured-datareads every built page's JSON-LD and checks each BreadcrumbList: positions count from 1, every step has a name and anitemURL, no URL repeats. It runs in the Site workflow after the build. Against the previousHead.astroit fails with 12 problems, one per docs page; against this branch it passes (15 JSON-LD blocks, 11 breadcrumb lists).The template has the same
Head.astroand needs the same fix; it goes over with the next sync, or as its own PR if you prefer.After merging, use Validate fix on the issue in Search Console to have Google re-crawl.