Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/moody-carrots-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/gatsby-theme-doctocat": patch
---

- Add withPrefix to breadcrumbs
3 changes: 2 additions & 1 deletion theme/src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import StorybookLink from './storybook-link'
import FigmaLink from './figma-link'
import TableOfContents from './table-of-contents'
import navItems from '../nav.yml'
import {withPrefix} from 'gatsby'

const getPageAncestry = (url, object) => {
const result = []
Expand Down Expand Up @@ -112,7 +113,7 @@ function Layout({children, pageContext, path}) {
{breadcrumbData.length > 1 ? (
<Breadcrumbs sx={{mb: 4}}>
{breadcrumbData.map(item => (
<Breadcrumbs.Item key={item.url} href={item.url} selected={path === item.url}>
<Breadcrumbs.Item key={item.url} href={withPrefix(item.url)} selected={path === item.url}>
{item.title}
</Breadcrumbs.Item>
))}
Expand Down