From bb8ac9b0cda539c6cb1bd723631d67808bb7907f Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Tue, 21 Apr 2026 16:00:30 +0200 Subject: [PATCH] fix: always include item field in BreadcrumbList JSON-LD Fixes Google Search Console error: missing field "item" in itemListElement. Also removes unused ahrefs site verification meta tag. --- site/src/components/Breadcrumbs.astro | 4 +++- site/src/layouts/BaseLayout.astro | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/site/src/components/Breadcrumbs.astro b/site/src/components/Breadcrumbs.astro index e1f57f5..0f7faef 100644 --- a/site/src/components/Breadcrumbs.astro +++ b/site/src/components/Breadcrumbs.astro @@ -15,6 +15,8 @@ const { items, base } = Astro.props; const allItems = [{ label: 'Home', href: `${base}/` }, ...items]; +const currentUrl = Astro.url.href; + const jsonLd = { '@context': 'https://schema.org', '@type': 'BreadcrumbList', @@ -22,7 +24,7 @@ const jsonLd = { '@type': 'ListItem', position: i + 1, name: item.label, - ...(item.href ? { item: `${SITE_ORIGIN}${item.href}` } : {}), + item: item.href ? `${SITE_ORIGIN}${item.href}` : currentUrl, })), }; --- diff --git a/site/src/layouts/BaseLayout.astro b/site/src/layouts/BaseLayout.astro index d51fdaf..77bed78 100644 --- a/site/src/layouts/BaseLayout.astro +++ b/site/src/layouts/BaseLayout.astro @@ -44,7 +44,6 @@ const canonical = canonicalUrl ?? `${SITE_ORIGIN}${base}${Astro.url.pathname.rep - {noIndex && }