mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-20 16:46:37 +08:00
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.
This commit is contained in:
parent
6b2a5af9f9
commit
bb8ac9b0cd
2 changed files with 3 additions and 2 deletions
|
|
@ -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,
|
||||
})),
|
||||
};
|
||||
---
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ const canonical = canonicalUrl ?? `${SITE_ORIGIN}${base}${Astro.url.pathname.rep
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#E6522C" />
|
||||
<meta name="author" content={AUTHOR_NAME} />
|
||||
<meta name="ahrefs-site-verification" content="da5bb74a487d1869ab3a7854e35e12f247bad1cb52116ede21ad9d01e26d1c68">
|
||||
{noIndex && <meta name="robots" content="noindex" />}
|
||||
|
||||
<SEO
|
||||
|
|
|
|||
Loading…
Reference in a new issue