@primer/doctocat-nextjs 0.0.0-20250626095112 → 0.0.0-20250626100459
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
|
@@ -152,13 +152,18 @@ export function Theme({pageMap, children}: ThemeProps) {
|
|
|
152
152
|
{activePath.reduce((acc, item, index, items) => {
|
|
153
153
|
const nextItem = items[index + 1]
|
|
154
154
|
|
|
155
|
-
// Skip
|
|
155
|
+
// Skip items in these cases:
|
|
156
|
+
// 1. When current item is a folder followed by its index page
|
|
157
|
+
// 2. When current item is an index page with a tab-label
|
|
156
158
|
if (
|
|
157
|
-
index < items.length - 1 &&
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
(index < items.length - 1 &&
|
|
160
|
+
nextItem.name === 'index' &&
|
|
161
|
+
item.route === nextItem.route &&
|
|
162
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
163
|
+
!nextItem.frontMatter?.['tab-label']) ||
|
|
164
|
+
(item.name === 'index' &&
|
|
165
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
166
|
+
item.frontMatter?.['tab-label'])
|
|
162
167
|
) {
|
|
163
168
|
return acc
|
|
164
169
|
}
|