enhance(seo): refine structured breadcrumb data
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 233
- Forks
- 61
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 82
Description
- sub part of https://github.com/mdn/yari/issues/11655
Summary
In structured breadcrumb data omit less important directories.
Details
Google automatically infers breadcrumbs from URL. But URLs may contain unwanted directory names that users don't neccessary follow to reach the page.
Google says:
We recommend providing breadcrumbs that represent a typical user path to a page, instead of mirroring the URL structure. Some parts of the URL path don't help people understand how the page fits in your website. For example, given the URL
https://example.com/pages/books/catcher_in_the_rye.html, thepagespath in the URL doesn't add any information, and neither does the top-level elementexample.com.
Using the breadcrumbs structured data the breadcrumbs sequence can be made short and useful:
The following structured data could be used:
<html>
<head>
<title>EventTarget: addEventListener() method - Web APIs | MDN</title>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"item": {
"@id": "https://developer.mozilla.org/en-US/docs/Web/API",
"name": "APIs",
"type": "WebPage"
}
},{
"@type": "ListItem",
"position": 2,
"item": {
"@id": "https://developer.mozilla.org/en-US/docs/Web/API/EventTarget",
"name": "EventTarget",
"type": "WebPage"
}
}]
}
</script>
</head>
<body>
</body>
</html>
Multiple breadcrumb trails
Implement multiple breadcrumb trails.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing structured breadcrumb generation in Fred and compare its output with the Google breadcrumb guidance and examples in this issue. Done means less important URL directories are omitted and multiple useful breadcrumb trails are represented in the structured data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100