@primer/doctocat-nextjs 0.0.0-20250626090518 → 0.0.0-20250626093303
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# @primer/doctocat-nextjs
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20250626093303
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Fake entry to force publishing
|
|
8
8
|
|
|
9
|
+
## 0.0.0-20250626093301
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#52](https://github.com/primer/doctocat-nextjs/pull/52) [`6351d43`](https://github.com/primer/doctocat-nextjs/commit/6351d434707cb9c8872e92e764bdf2a6a1ee4b45) Thanks [@danielguillan](https://github.com/danielguillan)! - Fixes breadcrumbs with duplicate and missing items
|
|
14
|
+
|
|
9
15
|
## 0.5.4
|
|
10
16
|
|
|
11
17
|
### Patch Changes
|
|
@@ -150,12 +150,17 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
150
150
|
</Breadcrumbs.Item>
|
|
151
151
|
)}
|
|
152
152
|
{activePath.reduce((acc, item, index, items) => {
|
|
153
|
-
// Skip
|
|
153
|
+
// Skip folder items when followed by index pages with the same route
|
|
154
|
+
// BUT ONLY if the index page doesn't have a custom tab-label
|
|
155
|
+
// AND the index page's title doesn't match the folder's title
|
|
154
156
|
if (
|
|
155
|
-
index
|
|
156
|
-
|
|
157
|
+
index < items.length - 1 &&
|
|
158
|
+
items[index + 1].name === 'index' &&
|
|
159
|
+
item.route === items[index + 1].route &&
|
|
157
160
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
158
|
-
!
|
|
161
|
+
!items[index + 1].frontMatter?.['tab-label'] &&
|
|
162
|
+
// Keep both when the titles match (don't skip the folder)
|
|
163
|
+
items[index + 1].title !== item.title
|
|
159
164
|
) {
|
|
160
165
|
return acc
|
|
161
166
|
}
|
|
@@ -173,8 +178,6 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
173
178
|
sx={{
|
|
174
179
|
textTransform: 'capitalize',
|
|
175
180
|
color: 'var(--brand-InlineLink-color-rest)',
|
|
176
|
-
pointerEvents: isLastItem ? 'none' : undefined,
|
|
177
|
-
cursor: isLastItem ? 'default' : undefined,
|
|
178
181
|
}}
|
|
179
182
|
>
|
|
180
183
|
{itemTitle.replace(/-/g, ' ')}
|