npm nextra 2.0.0-beta.2
Nextra 2.0.0 (beta.2)

latest releases: 4.0.0-app-router.26, 4.0.0-app-router.25, 4.0.0-app-router.24...
2 years ago

Since 2.0.0, version numbers of the Nextra core and official themes (blog, docs) will be matched precisely. This release includes:

  • nextra@2.0.0-beta.2
  • nextra-theme-blog@2.0.0-beta.2
  • nextra-theme-docs@2.0.0-beta.2

You can upgrade with yarn add nextra@beta or npm install nextra@beta.

Breaking Changes

MDX v2

Nextra 2 will use MDX 2, please check the corresponding migrating guide and blog post if you are interested.

Next.js 12

Since MDX v2 is ESM-only, Nextra 2 requires at least Next.js 12 for its native ESM support.

Highlighting Lines

Before v2, you can use the highlight=1,3-5 syntax to highlight specific lines in a pre code block:

```js highlight=1,3-5
import useSWR from 'swr'

export default function Page() {
  // ...
}
```

In v2, you need to wrap it with "" to make it a valid JSX prop:

```js highlight="1,3-5"
import useSWR from 'swr'

export default function Page() {
  // ...
}
```

(The following is generated automatically and includes all PRs since this is the first release created on GitHub)

What's Changed

New Contributors

Full Changelog: https://github.com/shuding/nextra/commits/v2.0.0-beta.2

Don't miss a new nextra release

NewReleases is sending notifications on new releases.