From ab55761411590de62de990316f70e87a1d496430 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Sat, 28 Mar 2026 17:37:38 +0100 Subject: [PATCH] refactor: Update JSON-LD itemListElement structure in category SEO to include URL field for better clarity and compliance with SEO standards --- prerender/seo/category.cjs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/prerender/seo/category.cjs b/prerender/seo/category.cjs index 74bc16a..a68b383 100644 --- a/prerender/seo/category.cjs +++ b/prerender/seo/category.cjs @@ -121,11 +121,15 @@ const generateCategoryJsonLd = (category, products = [], baseUrl, config) => { "@id": id.itemList, "@type": "ItemList", numberOfItems: withUrls.length, - itemListElement: withUrls.map((product, index) => ({ - "@type": "ListItem", - position: index + 1, - item: `${root}/Artikel/${product.seoName}`, - })), + itemListElement: withUrls.map((product, index) => { + const productPageUrl = `${root}/Artikel/${product.seoName}`; + return { + "@type": "ListItem", + position: index + 1, + url: productPageUrl, + item: productPageUrl, + }; + }), }); }