Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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+
constsegments= 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)

AltStyle によって変換されたページ (->オリジナル) /