@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
@@ -1,12 +1,12 @@
1
1
  # @primer/doctocat-nextjs
2
2
 
3
- ## 0.0.0-20250626095112
3
+ ## 0.0.0-20250626100459
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Fake entry to force publishing
8
8
 
9
- ## 0.0.0-20250626095110
9
+ ## 0.0.0-20250626100457
10
10
 
11
11
  ### Patch Changes
12
12
 
@@ -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 duplicate item for index pages without tab-label
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
- nextItem.name === 'index' &&
159
- item.route === nextItem.route &&
160
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
161
- !nextItem.frontMatter?.['tab-label']
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/doctocat-nextjs",
3
- "version": "0.0.0-20250626095112",
3
+ "version": "0.0.0-20250626100459",
4
4
  "description": "A Next.js theme for building Primer documentation sites",
5
5
  "main": "index.js",
6
6
  "type": "module",