diff --git a/docs/platforms/javascript/config.yml b/docs/platforms/javascript/config.yml index 02896bf79c77b8..4c0efe9e618baa 100644 --- a/docs/platforms/javascript/config.yml +++ b/docs/platforms/javascript/config.yml @@ -1,4 +1,5 @@ -title: JavaScript +title: Browser JavaScript +platformTitle: JavaScript caseStyle: camelCase supportLevel: production sdk: 'sentry.javascript.browser' diff --git a/src/components/breadcrumbs/index.tsx b/src/components/breadcrumbs/index.tsx index 6fd1e19f2e8772..cfc74c2bcf2b85 100644 --- a/src/components/breadcrumbs/index.tsx +++ b/src/components/breadcrumbs/index.tsx @@ -9,20 +9,26 @@ type BreadcrumbsProps = { }; export function Breadcrumbs({leafNode}: BreadcrumbsProps) { - const nodes: DocNode[] = []; + const breadcrumbs: {title: string; to: string}[] = []; + for (let node: DocNode | undefined = leafNode; node; node = node.parent) { if (node && !node.missing) { - nodes.unshift(node); + const to = node.path === '/' ? node.path : `/${node.path}/`; + const title = node.frontmatter.platformTitle ?? node.frontmatter.title; + + breadcrumbs.unshift({ + to, + title, + }); } } return (