Skip to content

Commit

Permalink
Fix properties BreadCrumbJsonLdProps (#1374)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagobbraga authored Feb 15, 2024
1 parent e0e3d36 commit 46da44c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 30 deletions.
25 changes: 8 additions & 17 deletions cypress/e2e/breadcrumb.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,26 @@ describe('Breadcrumb JSON-LD', () => {
{
'@type': 'ListItem',
position: 1,
item: {
'@id': 'https://example.com/books',
name: 'Books',
},
item: 'https://example.com/books',
name: 'Books',
},
{
'@type': 'ListItem',
position: 2,
item: {
'@id': 'https://example.com/books/authors',
name: 'Authors',
},
item: 'https://example.com/books/authors',
name: 'Authors',
},
{
'@type': 'ListItem',
position: 3,
item: {
'@id': 'https://example.com/books/authors/annleckie',
name: 'Ann Leckie',
},
item: 'https://example.com/books/authors/annleckie',
name: 'Ann Leckie',
},
{
'@type': 'ListItem',
position: 4,
item: {
'@id':
'https://example.com/books/authors/annleckie/ancillaryjustice',
name: 'Ancillary Justice',
},
item: 'https://example.com/books/authors/annleckie/ancillaryjustice',
name: 'Ancillary Justice',
},
],
});
Expand Down
12 changes: 4 additions & 8 deletions cypress/e2e/profilePage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,14 @@ describe('ProfilePage JSON-LD', () => {
{
'@type': 'ListItem',
position: 1,
item: {
'@id': 'https://example.com/books',
name: 'Books',
},
item: 'https://example.com/books',
name: 'Books',
},
{
'@type': 'ListItem',
position: 2,
item: {
'@id': 'https://example.com/books/authors',
name: 'Authors',
},
item: 'https://example.com/books/authors',
name: 'Authors',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-seo",
"version": "6.4.0",
"version": "6.4.1",
"description": "SEO plugin for Next.js projects",
"source": "src/index.tsx",
"main": "lib/next-seo.js",
Expand Down
6 changes: 2 additions & 4 deletions src/utils/schema/setItemListElements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ export function setItemListElements(items: ItemListElements[]) {
return items.map(item => ({
'@type': 'ListItem',
position: item.position,
item: {
'@id': item.item,
name: item.name,
},
item: item.item,
name: item.name,
}));
}

Expand Down

0 comments on commit 46da44c

Please sign in to comment.