Skip to content

Commit

Permalink
Merge branch 'main' into v4-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina committed Sep 30, 2024
2 parents 17e6da5 + fb2fc08 commit d3e2ed1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
7 changes: 7 additions & 0 deletions packages/nextra-theme-blog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@
- Updated dependencies [99f34d3]
- [email protected]

## 3.0.2

### Patch Changes

- Updated dependencies [b6341f7]
- [email protected]

## 3.0.1

### Patch Changes
Expand Down
9 changes: 9 additions & 0 deletions packages/nextra-theme-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@
- Updated dependencies [99f34d3]
- [email protected]

## 3.0.2

### Patch Changes

- 991b69a: handle empty `item.route` in `<FolderImpl` in `<Sidebar>` for
`item.type: 'menu'`
- Updated dependencies [b6341f7]
- [email protected]

## 3.0.1

### Patch Changes
Expand Down
7 changes: 4 additions & 3 deletions packages/nextra-theme-docs/src/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ type FolderProps = {
function Folder({ item, anchors, onFocus, level }: FolderProps): ReactElement {
const routeOriginal = useFSRoute()
const [route] = routeOriginal.split('#')
const active = [route, route + '/'].includes(item.route + '/')
const activeRouteInside = active || route.startsWith(item.route + '/')
const hasRoute = !!item.route // for item.type === 'menu' will be ''
const active = hasRoute && [route, route + '/'].includes(item.route + '/')
const activeRouteInside =
active || (hasRoute && route.startsWith(item.route + '/'))

const focusedRoute = useFocusedRoute()
const focusedRouteInside = focusedRoute.startsWith(item.route + '/')
Expand Down Expand Up @@ -130,7 +132,6 @@ function Folder({ item, anchors, onFocus, level }: FolderProps): ReactElement {
item.children = Object.entries(menu.items || {}).map(([key, item]) => {
const route = routes[key] || {
name: key,
...('locale' in menu && { locale: menu.locale }),
route: menu.route + '/' + key
}
return {
Expand Down
7 changes: 7 additions & 0 deletions packages/nextra/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@
Router, something may be broken, check
https://github.com/shuding/nextra/tree/v4-v2/examples for the migration guide

## 3.0.2

### Patch Changes

- b6341f7: remove warning
`Watchpack Error (initial scan): Error: ENOTDIR: not a directory, scandir 'path-to-your-node_modules/next/dist/pages/_app.js'`

## 3.0.1

## 3.0.0
Expand Down

0 comments on commit d3e2ed1

Please sign in to comment.