Skip to content

Commit b8e5cb6

Browse files
committed
docs: update schema markup generator
1 parent 80a58fc commit b8e5cb6

File tree

1 file changed

+11
-4
lines changed
  • packages/docs/src/components

1 file changed

+11
-4
lines changed

packages/docs/src/components/Seo.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,24 @@ const SEO = ({ title, description, name, image, article, pro }: SEOProps) => {
4444
}
4545

4646
const breadcrumbList = (startIndex = 1) => {
47-
return seo.url
47+
const segments = seo.url
4848
.replace('docs//', 'docs/')
4949
.replace(siteUrl, '')
5050
.split('/')
5151
.filter(Boolean)
52-
.map((item, index) => ({
52+
53+
return segments.map((item, index) => {
54+
const pathSegments = segments.slice(0, index + 1)
55+
const path = pathSegments.join('/')
56+
const fullPath = `${siteUrl}/${path}/`.replaceAll(/([^:])\/+/g, '$1/') // Zastąp wielokrotne slashe, ale nie po dwukropku
57+
58+
return {
5359
'@type': 'ListItem',
5460
position: index + startIndex,
5561
name: humanize(item),
56-
item: `${siteUrl}${item}`,
57-
}))
62+
item: fullPath,
63+
}
64+
})
5865
}
5966

6067
const getDynamicDescription = (pathname: string, name?: string): string => {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy