Skip to content

Commit ce79030

Browse files
authored
Breadcrumbs fix (#628)
* breadcrumbs fix * fix curly brackets on import * Create moody-carrots-know.md
1 parent 6d441a6 commit ce79030

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/moody-carrots-know.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/gatsby-theme-doctocat": patch
3+
---
4+
5+
- Add withPrefix to breadcrumbs

theme/src/components/layout.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import StorybookLink from './storybook-link'
1515
import FigmaLink from './figma-link'
1616
import TableOfContents from './table-of-contents'
1717
import navItems from '../nav.yml'
18+
import {withPrefix} from 'gatsby'
1819

1920
const getPageAncestry = (url, object) => {
2021
const result = []
@@ -112,7 +113,7 @@ function Layout({children, pageContext, path}) {
112113
{breadcrumbData.length > 1 ? (
113114
<Breadcrumbs sx={{mb: 4}}>
114115
{breadcrumbData.map(item => (
115-
<Breadcrumbs.Item key={item.url} href={item.url} selected={path === item.url}>
116+
<Breadcrumbs.Item key={item.url} href={withPrefix(item.url)} selected={path === item.url}>
116117
{item.title}
117118
</Breadcrumbs.Item>
118119
))}

0 commit comments

Comments
 (0)