diff --git a/prerender/seo/product.cjs b/prerender/seo/product.cjs index 7b2a184..2e88dc9 100644 --- a/prerender/seo/product.cjs +++ b/prerender/seo/product.cjs @@ -8,13 +8,19 @@ const generateProductMetaTags = (product, baseUrl, config) => { .trim()}.jpg` : `${baseUrl}/assets/images/nopicture.jpg`; + // Clean description for meta (remove HTML tags and limit length) - const cleanDescription = product.description - ? product.description + const cleanDescription = product.kurzBeschreibung + ? product.kurzBeschreibung .replace(/<[^>]*>/g, "") .replace(/\n/g, " ") .substring(0, 160) - : `${product.name} - Art.-Nr.: ${product.articleNumber}`; + : product.description + ? product.description + .replace(/<[^>]*>/g, "") + .replace(/\n/g, " ") + .substring(0, 160) + : `${product.name} - Art.-Nr.: ${product.articleNumber}`; return `