diff --git a/cypress/e2e/breadcrumb.spec.js b/cypress/e2e/breadcrumb.spec.js index 020f84d8..0a7ad692 100644 --- a/cypress/e2e/breadcrumb.spec.js +++ b/cypress/e2e/breadcrumb.spec.js @@ -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', }, ], }); diff --git a/cypress/e2e/profilePage.spec.js b/cypress/e2e/profilePage.spec.js index 339ff675..ae6a70d2 100644 --- a/cypress/e2e/profilePage.spec.js +++ b/cypress/e2e/profilePage.spec.js @@ -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', }, ], }, diff --git a/package.json b/package.json index 346fa502..73eccdc9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/utils/schema/setItemListElements.ts b/src/utils/schema/setItemListElements.ts index 5f34204c..e1db00c1 100644 --- a/src/utils/schema/setItemListElements.ts +++ b/src/utils/schema/setItemListElements.ts @@ -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, })); }